Kaydet (Commit) 0f3f88ec authored tarafından Marc Tamlyn's avatar Marc Tamlyn

Merge pull request #1270 from tomchristie/remove-incorrect-content-type-test-client

Remove incorrect CONTENT_TYPE header from GET and HEAD requests
...@@ -272,7 +272,6 @@ class RequestFactory(object): ...@@ -272,7 +272,6 @@ class RequestFactory(object):
parsed = urlparse(path) parsed = urlparse(path)
r = { r = {
'CONTENT_TYPE': str('text/html; charset=utf-8'),
'PATH_INFO': self._get_path(parsed), 'PATH_INFO': self._get_path(parsed),
'QUERY_STRING': urlencode(data, doseq=True) or force_str(parsed[4]), 'QUERY_STRING': urlencode(data, doseq=True) or force_str(parsed[4]),
'REQUEST_METHOD': str('GET'), 'REQUEST_METHOD': str('GET'),
...@@ -303,7 +302,6 @@ class RequestFactory(object): ...@@ -303,7 +302,6 @@ class RequestFactory(object):
parsed = urlparse(path) parsed = urlparse(path)
r = { r = {
'CONTENT_TYPE': str('text/html; charset=utf-8'),
'PATH_INFO': self._get_path(parsed), 'PATH_INFO': self._get_path(parsed),
'QUERY_STRING': urlencode(data, doseq=True) or force_str(parsed[4]), 'QUERY_STRING': urlencode(data, doseq=True) or force_str(parsed[4]),
'REQUEST_METHOD': str('HEAD'), 'REQUEST_METHOD': str('HEAD'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment