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

index e9fb3966b6f28ecf860205ce2d567b902ac9cba7..e72f6a61c15d2ca259a411b69b8025f304969c3f 100644 (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)