Merged revisions 78422 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78422 | senthil.kumaran | 2010-02-24 22:15:46 +0530 (Wed, 24 Feb 2010) | 2 lines

  Fix for Issue3819 - urllib2 sends Basic auth across redirects
........
This commit is contained in:
Senthil Kumaran 2010-02-24 16:49:45 +00:00
parent 66807853b4
commit e3c651a836
2 changed files with 3 additions and 2 deletions

View file

@ -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