Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4815 -- Fixed decoding of request parameters when the input en…

…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...
commit 8d9982c5a572358f0f3fc3402766ce9e3a06d90c 1 parent 86640f3
Malcolm Tredinnick authored July 11, 2007

Showing 1 changed file with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. 7  django/http/__init__.py
7  django/http/__init__.py
@@ -109,12 +109,11 @@ def __init__(self, query_string, mutable=False, encoding=None):
109 109
             # *Important*: do not import settings any earlier because of note
110 110
             # in core.handlers.modpython.
111 111
             from django.conf import settings
112  
-            self.encoding = settings.DEFAULT_CHARSET
113  
-        else:
114  
-            self.encoding = encoding
  112
+            encoding = settings.DEFAULT_CHARSET
  113
+        self.encoding = encoding
115 114
         self._mutable = True
116 115
         for key, value in parse_qsl((query_string or ''), True): # keep_blank_values=True
117  
-            self.appendlist(force_unicode(key, errors='replace'), force_unicode(value, errors='replace'))
  116
+            self.appendlist(force_unicode(key, encoding, errors='replace'), force_unicode(value, encoding, errors='replace'))
118 117
         self._mutable = mutable
119 118
 
120 119
     def _assert_mutable(self):

0 notes on commit 8d9982c

Please sign in to comment.
Something went wrong with that request. Please try again.