]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport bug #1016563: Bug in urllib2 proxy auth
authorGeorg Brandl <georg@python.org>
Wed, 24 Aug 2005 20:30:35 +0000 (20:30 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 24 Aug 2005 20:30:35 +0000 (20:30 +0000)
Lib/urllib2.py

index 3c777cdec7f0891c5924422ed3f530a4209538eb..f4c15ba0cb5196ac4fa59669bbc9d11c8a2b1de9 100644 (file)
@@ -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)