[issue15009] urlsplit can't round-trip relative-host urls.

Senthil Kumaran report at bugs.python.org
Fri Jun 29 13:07:33 CEST 2012


Senthil Kumaran <senthil at uthcode.com> added the comment:

Look at the following two bugs which dwelt on similar issues: Issue8339 and Issue7904 and in one message particular, msg102737, I seem to have come to a conclusion that " I don't see that 'x://' and 'x:///y' qualifies as valid URLS as per RFC 3986"   and it applies to this bug too where the url is requested as yelp:///x 

Does yelp://localhost/x be a way to access in your case? That would be consistent with specification. Or in your code, you can add 'yelp' to uses_netloc list and then expect the desired behavior.

from urlparse import uses_netloc
uses_netloc.append('yelp')

I understand that, using of the uses_netloc is a limitation, but given the requirements of both absolute and relative parsing that lists has served a useful behavior.

I would like to close this one for the above mention points and open a feature request (or convert this to a feature request) which asks to remove the dependency of uses_netloc in urlparse. Does this resolution sound okay?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15009>
_______________________________________


More information about the Python-bugs-list mailing list