Skip to content
Myr

Clean up handle_redirect.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yossi Gottlieb · committed by Yossi Gottlieb · parent 6ff6f75 · Browse files · 1 file+1 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−3 removed

  • other:+1 added−3 removed

1 file+1 added−3 removed

modified:requests/auth.py+1 added-3 removed
151 unmodified lines
152 return 'Digest %s' % (base)153154 def handle_redirect(self, r, **kwargs):155 """Reset num_401_calls counter on redirects."""156 if r.status_code in (157 codes.temporary_redirect,158 codes.permanent_redirect):156 if r.is_redirect:157 setattr(self, 'num_401_calls', 1)158159 def handle_401(self, r, **kwargs):160 """Takes the given response and tries digest-auth, if needed."""
44 unmodified lines