Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple auth headers correctly #1240

Merged
merged 3 commits into from Sep 1, 2020

Conversation

tomchristie
Copy link
Member

Closes #1234 by correctly treating WWW-Authenticate headers as possibly occurring multiple times, and only dealing with “Digest” headers, and just ignoring other types of authentications.

Copy link
Member

@florimondmanca florimondmanca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I had not realized either that two Auth headers were being sent back. :-)

auth = DigestAuth(username="tomchristie", password="password123")
auth_header = b"Token ..."

client = Client(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing, I guess this should be httpx.Client?

@tomchristie tomchristie added the bug Something isn't working label Sep 1, 2020
@tomchristie tomchristie merged commit 33d339a into master Sep 1, 2020
@tomchristie tomchristie deleted the handle-multiple-auth-headers branch September 1, 2020 13:08
@tomchristie tomchristie mentioned this pull request Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth fails for responses that include multiple WWW-Authenticate headers.
2 participants