Skip to content

Handle multiple auth headers correctly - #1240

Merged
lovelydinosaur merged 3 commits into
masterfrom
handle-multiple-auth-headers
Sep 1, 2020
Merged

Handle multiple auth headers correctly#1240
lovelydinosaur merged 3 commits into
masterfrom
handle-multiple-auth-headers

Conversation

@lovelydinosaur

Copy link
Copy Markdown
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.

@florimondmancaflorimondmanca left a comment

Copy link
Copy Markdown
Contributor

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. :-)

Comment threadtests/client/test_auth.py Outdated
auth = DigestAuth(username="tomchristie", password="password123")
auth_header = b"Token ..."

client = Client(

Copy link
Copy Markdown
Contributor

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?

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

Labels

bugSomething isn't working

Development

Successfully merging this pull request may close these issues.

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

2 participants

@lovelydinosaur@florimondmanca