Fixed #4815 -- Fixed decoding of request parameters when the input encoding is
not UTF-8. Thanks, Jordan Dimov. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
86640f33c1
commit
8d9982c5a5
|
@ -109,12 +109,11 @@ class QueryDict(MultiValueDict):
|
||||||
# *Important*: do not import settings any earlier because of note
|
# *Important*: do not import settings any earlier because of note
|
||||||
# in core.handlers.modpython.
|
# in core.handlers.modpython.
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
self.encoding = settings.DEFAULT_CHARSET
|
encoding = settings.DEFAULT_CHARSET
|
||||||
else:
|
|
||||||
self.encoding = encoding
|
self.encoding = encoding
|
||||||
self._mutable = True
|
self._mutable = True
|
||||||
for key, value in parse_qsl((query_string or ''), True): # keep_blank_values=True
|
for key, value in parse_qsl((query_string or ''), True): # keep_blank_values=True
|
||||||
self.appendlist(force_unicode(key, errors='replace'), force_unicode(value, errors='replace'))
|
self.appendlist(force_unicode(key, encoding, errors='replace'), force_unicode(value, encoding, errors='replace'))
|
||||||
self._mutable = mutable
|
self._mutable = mutable
|
||||||
|
|
||||||
def _assert_mutable(self):
|
def _assert_mutable(self):
|
||||||
|
|
Loading…
Reference in New Issue