Commit a5a2088d authored by Georg Brandl's avatar Georg Brandl

Bug 1016563: Bug in urllib2 proxy auth

parent b925602f
...@@ -585,7 +585,7 @@ class ProxyHandler(BaseHandler): ...@@ -585,7 +585,7 @@ class ProxyHandler(BaseHandler):
if ':' in user_pass: if ':' in user_pass:
user, password = user_pass.split(':', 1) user, password = user_pass.split(':', 1)
user_pass = base64.encodestring('%s:%s' % (unquote(user), user_pass = base64.encodestring('%s:%s' % (unquote(user),
unquote(password))) unquote(password))).strip()
req.add_header('Proxy-authorization', 'Basic ' + user_pass) req.add_header('Proxy-authorization', 'Basic ' + user_pass)
host = unquote(host) host = unquote(host)
req.set_proxy(host, type) req.set_proxy(host, type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment