Skip to content
Browse files

Changed core.handlers.modpython.populate_apache_request NOT to have s…

…ide effects on http_response. This has no effect on legacy code but will prevent problems in new code

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 8fd9440 commit cf4c164e9f76b7be2ea6257d223b76d4625f70c6 @adrianholovaty adrianholovaty committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/handlers/
4 django/core/handlers/
@@ -266,11 +266,11 @@ def _get_traceback(self):
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

0 comments on commit cf4c164

Please sign in to comment.
Something went wrong with that request. Please try again.