summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-12-17 10:49:26 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-12-22 13:32:39 +0100
commit1e4a27d08790c96f657d2e960c8142d1ca69aede (patch)
tree0f628babc0ea651867a223fbf7d9281bb2ce218b /django/test
parentd9a0b6ab36b6beb4251acf1de1fdf255e1223e02 (diff)
Fixed #19468 -- Decoded request.path correctly on Python 3.
Thanks aliva for the report and claudep for the feedback.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py
index a3c04bb20d..015ee1309a 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -245,7 +245,11 @@ class RequestFactory(object):
# If there are parameters, add them
if parsed[3]:
path += str(";") + force_str(parsed[3])
- return unquote(path)
+ path = unquote(path)
+ # WSGI requires latin-1 encoded strings. See get_path_info().
+ if six.PY3:
+ path = path.encode('utf-8').decode('iso-8859-1')
+ return path
def get(self, path, data={}, **extra):
"Construct a GET request."