]> granicus.if.org Git - python/commitdiff
Patch #1480067: don't redirect HTTP digest auth in urllib2
authorGeorg Brandl <georg@python.org>
Wed, 3 May 2006 05:05:02 +0000 (05:05 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 3 May 2006 05:05:02 +0000 (05:05 +0000)
Lib/urllib2.py

index e90b61f318e8e6e4215ab80b2882cfc9e9c05c20..8d38504d2bf491b03d71e2517809950fe8992c33 100644 (file)
@@ -858,7 +858,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