This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oberstet
Recipients ezio.melotti, nailor, oberstet, orsenthil
Date 2011-10-22.20:47:33
SpamBayes Score 0.0022614112
Marked as misclassified No
Message-id <1319316454.48.0.762240675949.issue13244@psf.upfronthosting.co.za>
In-reply-to
Content
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 initial comment]

I nevertheless added the ws/wss schemes to urlparse.uses_fragment so that I can detect them being used and throw.

Does urllib throw when an URL contains a fragment identifier, but the scheme of the URL is not in urlparse.uses_fragment?

If so, thats fine and of course better than putting the burden of checking on the user.

==

Further, when "#" is to be used in a WS URL, it MUST be encoded, and if so, it's interpreted as part of the query component.

So in summary, I think the best would be:

urllib throws upon non-encoded "#", and interpret it as part of the query component when encoded.
History
Date User Action Args
2011-10-22 20:47:34oberstetsetrecipients: + oberstet, orsenthil, ezio.melotti, nailor
2011-10-22 20:47:34oberstetsetmessageid: <1319316454.48.0.762240675949.issue13244@psf.upfronthosting.co.za>
2011-10-22 20:47:33oberstetlinkissue13244 messages
2011-10-22 20:47:33oberstetcreate