Open ewired opened 2 years ago
Thanks for reporting this, I didn't see it yesterday when I ran it with an older version of Webdis but I can reproduce it on the latest. This is likely a regression from #205. /cc @jessie-murray
@jessie-murray I've tracked it down with git-bisect
to your change in dc9d1b646e2d6d9daa295e23d54b3994f422bf02.
This is due to the header replacement code in http_response_set_header
, which overwrites the value here:
but later still increments the header count:
It needs to avoid this increment if no new value was added. For the case of OPTIONS
, somehow the Content-Length
header is set twice, both times to 0
. The second one causes this increment for which there's no key-value pair to write out.
I discussed the issue on the Fly help forum regarding the OPTIONS request responding with no CORS headers in #216. Fly's HTTP proxy is returning 502 because the OPTIONS response from Webdis has a blank
:
header with no name or value.See two lines above last line:
https://community.fly.io/t/http-handler-502-errors-on-options-request/4160/5?u=ewired