adamreichold / zeptohttpc

Proving ground for changes to attohttpc
Apache License 2.0
11 stars 0 forks source link

Fails with "Missing location" on some websites #8

Closed Shnatsel closed 3 years ago

Shnatsel commented 3 years ago

On some websites, e.g. http://macys.com, zeptohttpc v0.2.1 fails with the following error:

Missing location

Firefox and curl work fine.

50 websites out of the top million from Feb 3 Tranco list are affected.

Tested using this code. Test tool output from all affected websites: zepto-missing-location.tar.gz

adamreichold commented 3 years ago

Well these do indeed not set a Location header in their responses. macys.com does sent an error message in the body, but for example cloudsee.net sends an empty body anyway. Firefox and cURL just stop redirection in this case and from reading the HTTP/1.1 RFC this is correct as the server is not required to provide it, even though it should do so. Will follow their lead and stop redirection as well.