[issue14072] urlparse on tel: URI-s misses the scheme in some cases
Ezio Melotti
report at bugs.python.org
Mon May 7 00:27:42 CEST 2012
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
Here's a possible patch.
The problem is that urlsplit (in Lib/urllib/parse.py:348) tries to convert the part after the : (in this case +31-641044153 and +31641044153) to int to see if it's a port number. This doesn't work with +31-641044153, but it does with +31-641044153.
In the patch I'm assuming that the port number can only contain ascii digits (no leading '+/-', no spaces, no non-ascii digits) and checking for it explicitly, rather than using int() in a try/except.
----------
keywords: +patch
nosy: +ezio.melotti
stage: -> patch review
Added file: http://bugs.python.org/file25486/issue14072.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14072>
_______________________________________
More information about the Python-bugs-list
mailing list