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:
@@ -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),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user