Skip to content
Myr

Merge pull request #1242 from oviboy/master

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

HTTP Digest Auth case insensitive replacement of "Digest "

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 967cfbe, 9d16c72 · Browse files · 1 file+3 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:requests/auth.py+3 added-1 removed
6 unmodified lines
7This module contains the authentication handlers for Requests.8"""910import os11import re12import time13import hashlib14import logging15
135 unmodified lines
151152 if 'digest' in s_auth.lower() and num_401_calls < 2:153154 setattr(self, 'num_401_calls', num_401_calls + 1)155 pat = re.compile(r'digest ', flags=re.IGNORECASE)154 self.chal = parse_dict_header(s_auth.replace('Digest ', ''))156 self.chal = parse_dict_header(pat.sub('', s_auth))157158 # Consume content and release the original connection159 # to allow our new request to reuse the same one.160 r.content
17 unmodified lines