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 aronacher
Recipients aronacher
Date 2014-01-06.09:46:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389001619.16.0.909145148031.issue20138@psf.upfronthosting.co.za>
In-reply-to
Content
I just noticed through looking through someone else's WSGI framework that wsgiref is incorrectly handling URL handling.  It does not go through the WSGI coding dance in the wsgiref.utils.request_uri function.

Testcase through werkzeug:

>>> from wsgiref.util import request_uri
>>> from werkzeug.test import create_environ
>>> from werkzeug.urls import url_parse, url_unquote
>>> env = create_environ('/\N{SNOWMAN}')
>>> url_parse(request_uri(env)).path
'/%C3%A2%C2%98%C2%83'
>>> url_unquote(url_parse(request_uri(env)).path)
'/â\x98\x83'
>>> _ == '/\N{SNOWMAN}'
False

If this passes tests then I'm assuming that wsgiref is doing the inverse bug somewhere else.  I will look into it later, but this behavior is definitely broken.
History
Date User Action Args
2014-01-06 09:46:59aronachersetrecipients: + aronacher
2014-01-06 09:46:59aronachersetmessageid: <1389001619.16.0.909145148031.issue20138@psf.upfronthosting.co.za>
2014-01-06 09:46:59aronacherlinkissue20138 messages
2014-01-06 09:46:58aronachercreate