summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2011-03-17 08:48:26 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2011-03-17 08:48:26 (GMT)
commit1da1906871ab3e8872d797ffa1e722a214e1034e (patch)
tree09bfd27c69145cbdf4f7553e82646f76ebd1714d /Lib/http
parentbab07a652d811f2621538ffed6c46a41be2da888 (diff)
parentb253c9f66de1226ad6b72d79af70563671fe4320 (diff)
downloadcpython-1da1906871ab3e8872d797ffa1e722a214e1034e.zip
cpython-1da1906871ab3e8872d797ffa1e722a214e1034e.tar.gz
cpython-1da1906871ab3e8872d797ffa1e722a214e1034e.tar.bz2
Merge from 3.2
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/server.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index a35fd9d..fb9cb5f 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -103,15 +103,20 @@ import copy
# Default error message template
DEFAULT_ERROR_MESSAGE = """\
-<head>
-<title>Error response</title>
-</head>
-<body>
-<h1>Error response</h1>
-<p>Error code %(code)d.
-<p>Message: %(message)s.
-<p>Error code explanation: %(code)s = %(explain)s.
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+ <title>Error response</title>
+ </head>
+ <body>
+ <h1>Error response</h1>
+ <p>Error code: %(code)d</p>
+ <p>Message: %(message)s.</p>
+ <p>Error code explanation: %(code)s - %(explain)s.</p>
+ </body>
+</html>
"""
DEFAULT_ERROR_CONTENT_TYPE = "text/html;charset=utf-8"