You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As client, host in header is old one(set by hand) when redirect to new url, this may confuse some server and receive 301 response always, until raise TooManyRedirects.
Expected behaviour
Host in header be updated with new url when handle redirect request
Actual behaviour
Host always is old one and receive 301 response until raise Exception.
Steps to reproduce
Request a url which will redirect to different host, example:
Closed because the aiohttp`s behaviour is right: When user set host in header, client should not change it.(I didn't realize I had passed the host header in my usage, sorry for my thoughtless)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new
Long story short
As client, host in header is old one(set by hand) when redirect to new url, this may confuse some server and receive 301 response always, until raise TooManyRedirects.
Expected behaviour
Host in header be updated with new url when handle redirect request
Actual behaviour
Host always is old one and receive 301 response until raise Exception.
Steps to reproduce
Request a url which will redirect to different host, example:
Your environment
aiohttp 3.3.2 as client
MacOS 10.13.5
The text was updated successfully, but these errors were encountered: