From: Georg Brandl Date: Wed, 24 Aug 2005 20:30:35 +0000 (+0000) Subject: Backport bug #1016563: Bug in urllib2 proxy auth X-Git-Tag: v2.4.2c1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1694a5971bce0213b4e3f104aca830d2eb7b1fc7;p=thirdparty%2FPython%2Fcpython.git Backport bug #1016563: Bug in urllib2 proxy auth --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 3c777cdec7f0..f4c15ba0cb51 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -582,7 +582,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)