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
{{ message }}
Repository navigation
Document HSTS is still honored if allow_redirects=False #896
I will leave it open as I expected that allow_redirects=False would prevent that. At least the current behaviour which is corrent could be documented :)
Thanks, just reproduced quickly locally and it does look like we're just honoring HSTS, but no HTTP redirection is being made. I think your suggestion to document this behavior makes sense, so I updated the issue title to reflect this…
Activity
benoitc commentedon Apr 7, 2020
so it's probably happening because the domain is using HSTS:
httpx/httpx/_client.py
Lines 213 to 222 in 94323f9
I will leave it open as I expected that allow_redirects=False would prevent that. At least the current behaviour which is corrent could be documented :)
[-]error with allow_redirects=False[/-][+]Document HSTS is still honored if allow_redirects=False[/+]florimondmanca commentedon Apr 7, 2020
Thanks, just reproduced quickly locally and it does look like we're just honoring HSTS, but no HTTP redirection is being made. I think your suggestion to document this behavior makes sense, so I updated the issue title to reflect this…
florimondmanca commentedon Apr 7, 2020
Here's the
TRACEto confirm that no redirect was made, we just made the request using HTTPS in the first place: