Madison May added the comment:

urllib.parse.urlsplit() in Python3.3 behaves the same way.  Since urlsplit 
takes an optional param "allow_fragments", I don't think it should be a high 
priority issue.  

The relevant code from Python3.3 is below, however:

    if allow_fragments and '#' in url:
        url, fragment = url.split('#', 1)
    if '?' in url:
        url, query = url.split('?', 1)

Note that passwords containing '?' would produce a similar result, which is 
perhaps mildly more concerning, as there is no flag to ignore the query portion 
of the url.    

That being said, I'm against making any changes to urlsplit at this point, 
since that would also require modifying urlunsplit and may in fact make it much 
more difficult (or impossible) to rejoin a url.  The strength of the very 
simple implementation we have currently is that it's always reversible.

----------
nosy: +madison.may

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18140>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to