diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index 9d74eee59a1..0ab186eb01b 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -258,9 +258,9 @@ class ModPythonHandler: Returns an HttpResponse that displays a TECHNICAL error message for a fundamental database or coding error. """ - error_string = "
There's been an error:\n\n%s
" % self._get_traceback() + error_string = "There's been an error:\n\n%s" % self._get_traceback() responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError - return responseClass(error_string) + return responseClass(error_string, mimetype='text/plain') def _get_traceback(self): "Helper function to return the traceback as a string" diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 9a4c7192454..4e82a1be7ad 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -232,9 +232,9 @@ class WSGIHandler: Returns an HttpResponse that displays a TECHNICAL error message for a fundamental database or coding error. """ - error_string = "
There's been an error:\n\n%s
" % self._get_traceback() + error_string = "There's been an error:\n\n%s" % self._get_traceback() responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError - return responseClass(error_string) + return responseClass(error_string, mimetype='text/plain') def _get_traceback(self): "Helper function to return the traceback as a string"