summaryrefslogtreecommitdiff
path: root/flup/server/fcgi_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'flup/server/fcgi_base.py')
-rw-r--r--flup/server/fcgi_base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/flup/server/fcgi_base.py b/flup/server/fcgi_base.py
index 9b976c8..f4b9753 100644
--- a/flup/server/fcgi_base.py
+++ b/flup/server/fcgi_base.py
@@ -1214,7 +1214,8 @@ class BaseFCGIServer(object):
"""
if self.debug:
import cgitb
- req.stdout.write('Content-Type: text/html\r\n\r\n' +
+ req.stdout.write('Status: 500 Internal Server Error\r\n' +
+ 'Content-Type: text/html\r\n\r\n' +
cgitb.html(sys.exc_info()))
else:
errorpage = """<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
@@ -1225,5 +1226,6 @@ class BaseFCGIServer(object):
<p>An unhandled exception was thrown by the application.</p>
</body></html>
"""
- req.stdout.write('Content-Type: text/html\r\n\r\n' +
+ req.stdout.write('Status: 500 Internal Server Error\r\n' +
+ 'Content-Type: text/html\r\n\r\n' +
errorpage)