Tobias Oberstein <[email protected]> added the comment:
Is that patch supposed to be in Python 2.7.2?
If so, it doesn't work for "ws":
"ws://example.com/somewhere?foo=bar#dgdg"
F:\scm\Autobahn\testsuite\websockets\servers>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from urlparse import urlparse
>>> urlparse("ws://example.com/somewhere?foo=bar#dgdg")
ParseResult(scheme='ws', netloc='example.com', path='/somewhere?foo=bar#dgdg',
params='', query='', fragment='')
>>> urlparse("ws://example.com/somewhere?foo=bar#dgdg", allow_fragments = True)
ParseResult(scheme='ws', netloc='example.com', path='/somewhere?foo=bar#dgdg',
params='', query='', fragment='')
>>> urlparse("ws://example.com/somewhere?foo=bar#dgdg", allow_fragments = False)
ParseResult(scheme='ws', netloc='example.com', path='/somewhere?foo=bar#dgdg',
params='', query='', fragment='')
>>>
urlparse will neither parse the query nor the (invalid) fragment component for
the "ws" scheme
I would have expected
ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='',
query='foo=bar', fragment='dgdg')
----------
_______________________________________
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