Repository navigation
Conversation
|
There is an ugly counter variable that we use to keep track of the number of requests made in |
florimondmanca
left a comment
There was a problem hiding this comment.
Thanks! Left a refactoring suggestion.
florimondmanca
left a comment
There was a problem hiding this comment.
Great, thanks! Just a final nit.
Fixed. |
florimondmanca
left a comment
There was a problem hiding this comment.
Thanks!
Sorry for the dribs-and-drabs review, but I just realised this would ideally need some testing. Can we add one, ideally separate from the DigestAuth tests? (e.g. create an adhoc Auth subclass that e.g. sends the request twice, and verify the intermediate response is in the history)
|
From code in these lines: https://github.com/encode/httpx/blob/master/httpx/client.py#L456-L463, I think the history desigin is that every response in the history also got a history at its own perspective, but those responses created during handling auth don't have its own history, I think this is a little inconsistent. |
|
@florimondmanca I added a test. Can you please review this? |
|
@gdhameeja Thanks! After thinking quite deeply about it, I agree with @j178 that there's a slight inconsistency compared to redirects in that the Since I ended up with a complete implementation and tests, and before I saw your last comment :-), I pushed the result to #718. Would you like to give it a look? Then if that sounds good to you we can close this PR and roll with #718. |
|
Closing this as there is another PR for this. |
Fixes #669
Saves the response to
historyif authentication flow makes more than one request. This history is assigned toresponse.history