Skip to content
Myr

Digest auth: case insensitive replacement of 'digest ' string with '' from WWW-Authenticate

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

authored by Ovidiu Negrut · committed by Ovidiu Negrut · parent 3e72f23 · Browse files · 1 file+2 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+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:requests/auth.py+2 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)154 self.chal = parse_dict_header(s_auth.replace('Digest ', ''))155 self.chal = parse_dict_header(re.sub(r'digest ', '', s_auth, flags=re.IGNORECASE))156157 # Consume content and release the original connection158 # to allow our new request to reuse the same one.159 r.content
17 unmodified lines