Bug 1016563: Bug in urllib2 proxy auth

This commit is contained in:
Georg Brandl 2005-08-24 20:29:32 +00:00
parent b925602f16
commit a5a2088dd7

View file

@ -585,7 +585,7 @@ class ProxyHandler(BaseHandler):
if ':' in user_pass:
user, password = user_pass.split(':', 1)
user_pass = base64.encodestring('%s:%s' % (unquote(user),
unquote(password)))
unquote(password))).strip()
req.add_header('Proxy-authorization', 'Basic ' + user_pass)
host = unquote(host)
req.set_proxy(host, type)