Bugs item #944396, was opened at 2004-04-29 11:04
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=944396&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Duplicate
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:[EMAIL PROTECTED]')
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: '[EMAIL PROTECTED]'

cheers,

Chris

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-02-20 21:00

Message:
Logged In: YES 
user_id=849994

This is also reported by #979407.

----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2004-05-05 21:22

Message:
Logged In: YES 
user_id=43607

I don't know (nor care) about RFC 1738, but it's successor
RFC 2396 *does* mention <userinfo>@<host>:<port> as a
possible "server".  See section 3.2.2.  I admit, it also
says that it is not recommended, but it does specifically
allow username + password in the URI.

----------------------------------------------------------------------

Comment By: Chris Withers (fresh)
Date: 2004-05-05 21:01

Message:
Logged In: YES 
user_id=24723

However, given that the original urllib supported this, it
is suprising that urllib2 doesn't.

----------------------------------------------------------------------

Comment By: Andrew Langmead (langmead)
Date: 2004-05-05 20: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
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to