]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1480067: don't redirect HTTP digest auth in urllib2
authorGeorg Brandl <georg@python.org>
Wed, 3 May 2006 05:05:08 +0000 (05:05 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 3 May 2006 05:05:08 +0000 (05:05 +0000)
 (backport from rev. 45879)

Lib/urllib2.py

index 33babe4bdfba291fd81b68e6d9eb54cd481c01b1..eaabd9c853b4d427392ad76bb5eb5db591faca2b 100644 (file)
@@ -815,7 +815,7 @@ class AbstractDigestAuthHandler:
             auth_val = 'Digest %s' % auth
             if req.headers.get(self.auth_header, None) == auth_val:
                 return None
-            req.add_header(self.auth_header, auth_val)
+            req.add_unredirected_header(self.auth_header, auth_val)
             resp = self.parent.open(req)
             return resp