From 3b0d8b8e39c5d7ead5f11276a496378a9676aeb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Tue, 21 May 2013 17:48:30 +0000 Subject: [PATCH] don't replace 'Digest' in digest header value See https://github.com/kennethreitz/requests/issues/1358 --- requests/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/auth.py b/requests/auth.py index 0a8f310..fab05cf 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -153,7 +153,7 @@ class HTTPDigestAuth(AuthBase): setattr(self, 'num_401_calls', num_401_calls + 1) pat = re.compile(r'digest ', flags=re.IGNORECASE) - self.chal = parse_dict_header(pat.sub('', s_auth)) + self.chal = parse_dict_header(pat.sub('', s_auth, count=1)) # Consume content and release the original connection # to allow our new request to reuse the same one. -- 2.7.4