[New-bugs-announce] [issue5843] Possible normalization error in urlparse.urlunparse
Éric Araujo <report@bugs.python.org> at psf.upfronthosting.co.za
Éric Araujo <report@bugs.python.org> at psf.upfronthosting.co.za
Sat Apr 25 21:12:39 CEST 2009
New submission from Éric Araujo <merwok at netwok.org>:
Docstring for urlunparse says:
"""Put a parsed URI back together again. This may result in a
slightly different, but equivalent URI, if the URI that was parsed
originally had redundant delimiters, e.g. a ? with an empty query
(the draft states that these are equivalent)."""
“Draft” here refers to RFC 1808, superseded by 3986. However, RFC 3986
(section 6.2.3) states:
“Normalization should not remove delimiters when their associated
component is empty unless licensed to do so by the scheme
specification. For example, the URI "http://example.com/?" cannot be
assumed to be equivalent to any of the examples above. Likewise, the
presence or absence of delimiters within a userinfo subcomponent is
usually significant to its interpretation. The fragment component is
not subject to any scheme-based normalization; thus, two URIs that
differ only by the suffix "#" are considered different regardless of
the scheme.”
I guess we need some tests here to check compliance.
----------
messages: 86538
nosy: Merwok
severity: normal
status: open
title: Possible normalization error in urlparse.urlunparse
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5843>
_______________________________________
More information about the New-bugs-announce
mailing list