New submission from Éric Araujo <mer...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue5843>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to