Skip to content

DigestAuth will raise an exception if non replayable request is passed #670 - #684

Closed
kousikmitra wants to merge 1 commit into
encode:masterfrom
kousikmitra:master
Closed

kousikmitra wants to merge 1 commit into
encode:masterfrom
kousikmitra:master

Conversation

@kousikmitra

@kousikmitra kousikmitra commented Dec 25, 2019 •

Copy link
Copy Markdown
Contributor

Fixes #670

  1. DigestAuth will now raise an RedirectBodyUnavailable exception if a non-replayable request is passed to its __call__ method.

Feedback will be appreciated. :)

@florimondmanca florimondmanca 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.

Thanks for this @kousikmitra! Edited the description to reference the PR.

Should we look at renaming the RedirectBodyUnavailable exception into something more generic, eg RequestBodyUnavailable? This could apply to both the redirect and digest auth cases.

Also probably worth adding a test for this as well? :-)

Comment thread httpx/auth.py
@kousikmitra

kousikmitra commented Dec 25, 2019 •

Copy link
Copy Markdown
Contributor Author

@florimondmanca I will rename it and add the test case. Thanks for the feedback.

@kousikmitra

Copy link
Copy Markdown
Contributor Author

Thanks for this @kousikmitra! Edited the description to reference the PR.

Should we look at renaming the RedirectBodyUnavailable exception into something more generic, eg RequestBodyUnavailable? This could apply to both the redirect and digest auth cases.

Also probably worth adding a test for this as well? :-)

Should I just rename the exception or add new exception class RequestBodyUnavailable and derive that class from RedirectBodyUnavailable` for compatibility?

@kousikmitra

kousikmitra commented Dec 26, 2019 •

Copy link
Copy Markdown
Contributor Author

I deleted my fork by mistake so creating a new pull request and closing this one.
New pull request is in #685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

DigestAuth should raise a clear error if the request cannot replay.

3 participants