[ python-Bugs-944396 ] urllib2 doesn't handle username/password in
url
SourceForge.net
noreply at sourceforge.net
Wed May 5 16:34:04 EDT 2004
Bugs item #944396, was opened at 2004-04-29 07:04
Message generated for change (Comment added) made by langmead
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=944396&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Withers (fresh)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 doesn't handle username/password in url
Initial Comment:
>>> urllib2.urlopen('http://username:password@server')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\PYTHON23\lib\urllib2.py", line 129, in urlopen
return _opener.open(url, data)
File "C:\PYTHON23\lib\urllib2.py", line 326, in open
'_open', req)
File "C:\PYTHON23\lib\urllib2.py", line 306, in
_call_chain
result = func(*args)
File "C:\PYTHON23\lib\urllib2.py", line 901, in http_open
return self.do_open(httplib.HTTP, req)
File "C:\PYTHON23\lib\urllib2.py", line 860, in do_open
h = http_class(host) # will parse host:port
File "C:\Python23\lib\httplib.py", line 1009, in __init__
self._setup(self._connection_class(host, port, strict))
File "C:\Python23\lib\httplib.py", line 507, in __init__
self._set_hostport(host, port)
File "C:\Python23\lib\httplib.py", line 518, in
_set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: 'password at server'
cheers,
Chris
----------------------------------------------------------------------
Comment By: Andrew Langmead (langmead)
Date: 2004-05-05 16:34
Message:
Logged In: YES
user_id=119306
Although allowing a username and password in the URL is a
common client extension, it is not part of the standard <http://
rfc.net/rfc1738.html#s3.3.>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=944396&group_id=5470
More information about the Python-bugs-list
mailing list