1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #5982 -- Changed test client's URL processing to match core's (everything

gets run through urllib.unquote()). Patch from Leo Shklovskii and Russell
Keith-Magee.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-03-20 06:50:54 +00:00
parent 9e47cc2e51
commit 597f9d6105
5 changed files with 47 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
import urllib
import sys
from cStringIO import StringIO
from django.conf import settings
@@ -208,7 +209,7 @@ class Client:
r = {
'CONTENT_LENGTH': None,
'CONTENT_TYPE': 'text/html; charset=utf-8',
'PATH_INFO': path,
'PATH_INFO': urllib.unquote(path),
'QUERY_STRING': urlencode(data, doseq=True),
'REQUEST_METHOD': 'GET',
}
@@ -227,7 +228,7 @@ class Client:
r = {
'CONTENT_LENGTH': len(post_data),
'CONTENT_TYPE': content_type,
'PATH_INFO': path,
'PATH_INFO': urllib.unquote(path),
'REQUEST_METHOD': 'POST',
'wsgi.input': StringIO(post_data),
}