Tobias Oberstein <[email protected]> added the comment:
The patch as it stands will result in wrong behavior:
+ self.assertEqual(urllib.parse.urlparse("ws://example.com/stuff#ff"),
+ ('ws', 'example.com', '/stuff#ff', '', '', ''))
The path component returned is invalid for ws/wss and is invalid for any scheme
following the generic URI RFC, since # must be always escaped in path
components.
Is urlparse meant to follow the generic URI RFC?
IMHO, the patch at least should do the equivalent of
urlparse.uses_fragment.extend(wsschemes)
so users of urlparse can do the checking for fragment != "", required for
ws/wss on their own.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com