Skip to content

Commit

Permalink
Fixed #4815 -- Fixed decoding of request parameters when the input en…
Browse files Browse the repository at this point in the history
…coding is

not UTF-8. Thanks, Jordan Dimov.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Jul 11, 2007
1 parent 86640f3 commit 8d9982c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions django/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ def __init__(self, query_string, mutable=False, encoding=None):
# *Important*: do not import settings any earlier because of note
# in core.handlers.modpython.
from django.conf import settings
self.encoding = settings.DEFAULT_CHARSET
else:
self.encoding = encoding
encoding = settings.DEFAULT_CHARSET
self.encoding = encoding
self._mutable = 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

def _assert_mutable(self):
Expand Down

0 comments on commit 8d9982c

Please sign in to comment.