[Python-bugs-list] [ python-Bugs-406683 ] typos in urllib2 ( cvs )
nobody
nobody@usw-sf-web1.sourceforge.net
Thu, 08 Mar 2001 09:59:09 -0800
Bugs #406683, was updated on 2001-03-07 05:23
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=406683&group_id=5470
Category: Python Library
Group: None
Status: Open
Priority: 5
Submitted By: Bernd S. Brentrup
Assigned to: Nobody/Anonymous
Summary: typos in urllib2 ( cvs )
Initial Comment:
urllib2.ProxyHandler fails due to typos when using proxy
autthentication, patch included.
----------------------------------------------------------------------
Comment By: Eduardo Fernandez Corrales
Date: 2001-03-08 09:59
Message:
Logged In: YES
user_id=169128
I have corrected the patch to reflect proper Basic
Authentication:
--- /var/local/cvs/python/dist/src/Lib/urllib2.py Thu
Mar 1 09:46:07 2001
+++ /usr/local/lib/python2.1/urllib2.py Thu Mar 8 17:23:31
2001
@@ -477,8 +477,8 @@
host, XXX = splithost(r_type)
if '@' in host:
user_pass, host = host.split('@', 1)
- user_pass = base64.encode_string(unquote
(user_passw)).strip()
- req.addheader('Proxy-Authorization', user_pass)
+ user_pass = "Basic " + base64.encodestring
(unquote(user_pass)).strip()
+ req.add_header('Proxy-Authorization',
user_pass)
host = unquote(host)
req.set_proxy(host, type)
if orig_type == type:
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=406683&group_id=5470