[issue13244] WebSocket schemes in urlparse

2011-10-24 Thread Tobias Oberstein
Tobias Oberstein added the comment: ok, there was feedback on Hybi list: http://www.ietf.org/mail-archive/web/hybi/current/msg09270.html """ 1. ws://example.com/something#somewhere 2. ws://example.com/something#somewhere/ 3. ws://example.com/something#somewhere/foo 4. ws://exam

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: >>> urlparse.urlparse("ws://example.com/something#somewhere") ParseResult(scheme='ws', netloc='example.com', path='/something#somewhere', params='', query='', fragment='') This makes me sad. I thought we had fixed urllib months ago to follow the damn rules that

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: sorry for "throw" .. somewhat bad habit (stemming from wandering between languages). uses_fragment extended: [autobahn@autobahnhub ~/Autobahn]$ python Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 Type "help",

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: > Actually, if I get it right, it means that following url is valid: > ws://example.com/something#somewhere/ I don’t think so. The URI syntax RFC is generic, so a scheme spec cannot redefine the parsing to mean that in your above example, there is no fragment a

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: here the links to the question on the Hybi list: http://www.ietf.org/mail-archive/web/hybi/current/msg09257.html and http://www.ietf.org/mail-archive/web/hybi/current/msg09258.html http://www.ietf.org/mail-archive/web/hybi/current/msg09243.html == I'll tr

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I'll ask (to be sure) and link. However, after rereading the Hybi 17 section, it says """ path = """ And http://tools.ietf.org/html/rfc3986 says: """ The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: I'd take only 4. as invalid, as the WebSocket (to my interpretation) do not have fragments, so it is assumed to be a part of the path in that case. But yeah, a confirmation from HyBi would be great. Can you link to the discussion from here, if you ask them

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I see how you interpret that sentence in the spec, but I would have read it differently: invalid: 1. ws://example.com/something#somewhere 2. ws://example.com/something#somewhere/ 3. ws://example.com/something#somewhere/foo 4. ws://example.com/something?quer

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: Actually, if I get it right, it means that following url is valid: ws://example.com/something#somewhere/ and the # should be considered as being a part of the path. The spec does not say a thing should the # in path component be encoded, so I think it's s

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: Well, thinking about it, %23 can also appear in a percent encoded path component. I don't get the conditional "..if used as part of the query component" in the spec. -- ___ Python tracker

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: fragment identifiers: the spec says: "Fragment identifiers are meaningless in the context of WebSocket URIs, and MUST NOT be used on these URIs. The character "#" in URIs MUST be escaped as %23 if used as part of the query component." [see last line of my

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: I added a patch that adds support for WebSocket URL protocol. However, a few pointers (and questions): - The patch is now implemented according to Draft 17[1] of WebSocket protocol - Draft 17 does not support fragments, it states that the fragments should b

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti, orsenthil stage: -> test needed versions: +Python 3.3 -Python 2.7 ___ Python tracker ___ __

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
New submission from Tobias Oberstein : The urlparse module currently does not support the new "ws" and "wss" schemes used for the WebSocket protocol. As a workaround, we currently use the following code (which is a hack of course): import urlparse wsschemes = ["ws", "wss"] urlparse.uses_relat