summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-02-24 16:45:46 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-02-24 16:45:46 (GMT)
commit8526adfbd901f766b90f0116d8a40a1a4bdc8fb7 (patch)
tree22dbb5398f8107da54c2e07d15c4ef7c9a6ee967 /Lib/urllib2.py
parent2d9856d6ce7b338793e5b3c26206500cee2687d7 (diff)
downloadcpython-8526adfbd901f766b90f0116d8a40a1a4bdc8fb7.zip
cpython-8526adfbd901f766b90f0116d8a40a1a4bdc8fb7.tar.gz
cpython-8526adfbd901f766b90f0116d8a40a1a4bdc8fb7.tar.bz2
Fix for Issue3819 - urllib2 sends Basic auth across redirects
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 87ef9fb..122f777 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -839,7 +839,7 @@ class AbstractBasicAuthHandler:
auth = 'Basic %s' % base64.b64encode(raw).strip()
if req.headers.get(self.auth_header, None) == auth:
return None
- req.add_header(self.auth_header, auth)
+ req.add_unredirected_header(self.auth_header, auth)
return self.parent.open(req, timeout=req.timeout)
else:
return None