[issue2195] urlparse() does not handle URLs with port numbers properly

Gawain Bolton report at bugs.python.org
Sat Mar 1 00:20:59 CET 2008

Gawain Bolton added the comment:

On the contrary, RFC 1738 does mention the port number in section 3.1. 
Common Internet Scheme Syntax:

   While the syntax for the rest of the URL may vary depending on the
   particular scheme selected, URL schemes that involve the direct use
   of an IP-based protocol to a specified host on the Internet use a
   common syntax for the scheme-specific data:


   Some or all of the parts "<user>:<password>@", ":<password>",
   ":<port>", and "/<url-path>" may be excluded.  The scheme specific
   data start with a double slash "//" to indicate that it complies with
   the common Internet scheme syntax.

I agree with Christos Georgiou's suggestion that if the a default 
scheme is passed AND the default scheme is a URL scheme, then the 
scheme should be identified as being before "://".

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list