Skip to content
Myr

Solves #722

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent d74d61e · Browse files · 1 file+5 added−1 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+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/auth.py+5 added-1 removed
95 unmodified lines
96 r.headers['Content-Type'] = 'application/x-www-form-urlencoded'97 r.url, r.headers, r.data = self.client.sign(98 unicode(r.full_url), unicode(r.method), r.data, r.headers)99100 # Both flows add params to the URL by using r.full_url,101 # so this prevents adding it again later102 r.params = {}103104 # Having the authorization header, key or value, in unicode will105 # result in UnicodeDecodeErrors when the request is concatenated106 # by httplib. This can easily be seen when attaching files.107 # Note that simply encoding the value is not enough since Python
38 unmodified lines
146 def handle_401(self, r):147 """Takes the given response and tries digest-auth, if needed."""148149 num_401_calls = r.request.hooks['response'].count(self.handle_401)146 150151 s_auth = r.headers.get('www-authenticate', '')152153 if 'digest' in s_auth.lower() and num_401_calls < 2:154
207 unmodified lines