id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 20530,Incorrect QUERY_STRING handling on Python 3,Armin Ronacher,Aymeric Augustin,"Certain browsers (IE cough) will not fully encode the path in the request in all situations. As such you will encounter non ascii letters in the request line. Currently the QueryDict does not handle that properly. In addition to that it also means that the WSGI `QUERY_STRING` variable needs to be handled the same way as `PATH_INFO` and `SCRIPT_NAME`. Here is what is necessary to handle the case properly: 1. the `environ['QUERY_STRING']` attribute needs to go through the PEP 3333 dance on Python 3 that creates a bytes object 2. unquoting happens on the bytes 3. finally everything is done to the intended encoding (UTF-8) The logic currently employed by QueryDict in combination with the WSGIRequest object is double wrong: 1. the WSGIRequest object is not properly doing the dance and passes a (potentially mangled) unicode string to query dict 2. the query dict decodes that incorrectly formatted unicode string (WSGI on 3.x intentionally incorrectly encodes information) causing invalid data to show up in request.args Independently of that if bytes are passed to the QueryDict it does not do proper decoding unless the bytes are a subset of ASCII.",Bug,closed,Core (URLs),1.5,Normal,fixed,,,Accepted,0,0,0,0,0,0