summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-06 10:04:07 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-06 10:04:07 +0000
commitcb09e10eb2634243f25ae61e439a71ca47d98884 (patch)
tree9bcf21f1bba2c50d0fe20fa40aad56a64bc75499 /django/core/handlers/modpython.py
parent04a66b6e55e77c60c8860c2122fb2036438d4c4f (diff)
i18n: merged r776:r786 from trunk
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index 623db959b2..e52879065f 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -150,14 +150,15 @@ class ModPythonHandler(BaseHandler):
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
+ from django.conf import settings
+ mod_python_req.content_type = http_response['Content-Type']
for key, value in http_response.headers.items():
if key != 'Content-Type':
mod_python_req.headers_out[key] = value
for c in http_response.cookies.values():
mod_python_req.headers_out.add('Set-Cookie', c.output(header=''))
mod_python_req.status = http_response.status_code
- mod_python_req.write(http_response.get_content_as_string('utf-8'))
+ mod_python_req.write(http_response.get_content_as_string(settings.DEFAULT_CHARSET))
def handler(req):
# mod_python hooks into this function.