Client(follow_redirects=True) drops basic auth from URL #3231
Unanswered
douglas-raillard-arm
asked this question in
Potential Issue
Replies: 1 comment
-
|
Actually it looks like the username/password are requoted, similarly to this issue: #2863 According to to this SO post:
So httpx should not attempt to re-quote the URL it gets from the EDIT: the httpx/httpx/_transports/default.py Line 364 in db9072f |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
httpx follows redirections, but if the redirected URL contains a basic auth username/password, those are dropped by httpx before making the GET request, which then fails:
=> 401 unauthorized
Note that in step 3., httpx logs "INFO HTTP Request: GET http://username:password@private.com/bar" but this is deceiving, the real GET request issued does not contain username/password.
Beta Was this translation helpful? Give feedback.
All reactions