﻿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
19081	Non-ASCII query string aren't decoded properly	Aymeric Augustin	Aymeric Augustin	"In [fcc8de05] I enabled `unicode_literals` in `django.core.servers.basehttp`.

This turns `environ['QUERY_STRING']` into a unicode string, which later on prevents correct decoding in `QueryDict`.

Basically the fix is:

{{{
diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py
index 19b287a..af8f2a0 100644
--- a/django/core/servers/basehttp.py
+++ b/django/core/servers/basehttp.py
@@ -144,9 +144,9 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler, object):
         env['SERVER_PROTOCOL'] = self.request_version
         env['REQUEST_METHOD'] = self.command
         if '?' in self.path:
-            path,query = self.path.split('?',1)
+            path, query = self.path.split(b'?', 1)
         else:
-            path,query = self.path,''
+            path, query = self.path, b''
 
         env['PATH_INFO'] = unquote(path)
         env['QUERY_STRING'] = query
}}}

An audit of this module seems necessary. It may even be extended to `django.core.servers`."	Bug	new	HTTP handling	dev	Release blocker				Accepted	1	0	1	0	0	0
