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

Buck Golemon report at bugs.python.org
Wed Jun 6 00:28:27 CEST 2012

New submission from Buck Golemon <buck at yelp.com>:

1) As long as x is valid, I expect that urlunsplit(urlsplit(x)) == x
2) yelp:///foo is a well-formed (albeit odd) url. It it similar to file:///tmp: it specifies the /foo resource, on the "current" host, using the yelp protocol (defined on mobile devices).

>>> from urlparse import urlsplit, urlunsplit
>>> urlunsplit(urlsplit('yelp:///foo'))

Urlparse / unparse has the same bug:

>>> urlunparse(urlparse('yelp:///foo'))

The file: protocol seems to be special-case, in an inappropriate manner:

>>> urlunsplit(urlsplit('file:///tmp'))

components: Library (Lib)
messages: 162378
nosy: Buck.Golemon
priority: normal
severity: normal
status: open
title: urlsplit can't round-trip relative-host urls.
versions: Python 2.6, Python 2.7, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list