From: Georg Brandl Date: Wed, 24 Aug 2005 20:29:32 +0000 (+0000) Subject: Bug 1016563: Bug in urllib2 proxy auth X-Git-Tag: v2.5a0~1461 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5a2088dd7ea5f4434a4266995b194da91b28b77;p=thirdparty%2FPython%2Fcpython.git Bug 1016563: Bug in urllib2 proxy auth --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index e9fb3966b6f2..e72f6a61c15d 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -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)