diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-11-03 12:54:06 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-11-03 13:07:02 +0100 |
| commit | b99707bdedbcbf832bd88eaefd488c841110a222 (patch) | |
| tree | 6e963f4a064d22b245f05303ca42638dae647558 /django/http/request.py | |
| parent | f12fa7750c95cafa3a317be6a62ed3a2f53caf3c (diff) | |
[1.5.x] Fixed #19101 -- Decoding of non-ASCII POST data on Python 3.
Thanks Claude Paroz.
Backport of 095eca8 from master.
Diffstat (limited to 'django/http/request.py')
| -rw-r--r-- | django/http/request.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/http/request.py b/django/http/request.py index 96c7606c86..d3f0888d47 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -276,6 +276,9 @@ class QueryDict(MultiValueDict): encoding = settings.DEFAULT_CHARSET self.encoding = encoding if six.PY3: + if isinstance(query_string, bytes): + # query_string contains URL-encoded data, a subset of ASCII. + query_string = query_string.decode() for key, value in parse_qsl(query_string or '', keep_blank_values=True, encoding=encoding): |
