summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-18 20:14:05 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-18 20:14:05 +0000
commitcf4c164e9f76b7be2ea6257d223b76d4625f70c6 (patch)
tree88aceb4423bbc9ad192da9b466a9d2fc2c51ad12 /django/core/handlers/modpython.py
parent8fd94405b51298e84fea604f339b8147df583270 (diff)
Changed core.handlers.modpython.populate_apache_request NOT to have side effects on http_response. This has no effect on legacy code but will prevent problems in new code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index d651dcc657..8e2a8843f3 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -266,11 +266,11 @@ class ModPythonHandler:
def populate_apache_request(http_response, mod_python_req):
"Populates the mod_python request object with an HttpResponse"
mod_python_req.content_type = http_response['Content-Type'] or httpwrappers.DEFAULT_MIME_TYPE
- del http_response['Content-Type']
if http_response.cookies:
mod_python_req.headers_out['Set-Cookie'] = http_response.cookies.output(header='')
for key, value in http_response.headers.items():
- mod_python_req.headers_out[key] = value
+ if key != 'Content-Type':
+ mod_python_req.headers_out[key] = value
mod_python_req.status = http_response.status_code
mod_python_req.write(http_response.get_content_as_string('utf-8'))