New submission from Armin Ronacher: 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. ---------- messages: 207418 nosy: aronacher priority: normal severity: normal status: open title: wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20138> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com