[issue20116] urlparse.parse_qs should take argument for query separator
Luiz Poleto
report at bugs.python.org
Fri Apr 15 09:09:52 EDT 2016
Luiz Poleto added the comment:
If this bug is to be moved forward, we should consider this:
The RFC 3986 defines that a query can have any of these characters:
/?:@-._~!$&'()*+,;= ALPHA DIGIT %HH (encoded octet)
But does not define how the data should be interpreted, leaving that to the naming authority and the URI schema (although http/https doesn't specify it as well; see RFC 7230).
OTOH, parse_qs (both on 2.x and 3.x) is very specific that the query string is of type application/x-www-form-urlencoded; which defines that the name is separated from the value by '=' and name/value pairs are separated from each other by '&', although the use of ';' to separate the pairs is only suggested to be supported by HTTP server implementors.
It could be that adding support to the characters specified by RFC 3986 pose as a challenge since there is no fixed schema and they can be freely used by the naming authority so perhaps we could add a parameter to enable/disable ';' as a pair separator?
----------
nosy: +poleto
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20116>
_______________________________________
More information about the Python-bugs-list
mailing list