summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2011-03-17 09:01:45 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2011-03-17 09:01:45 (GMT)
commit9f9193ec375ed0f366b4aabfe210e7fdc3eb6b7d (patch)
treebe68d4ca48710938e732352724b437907e92e21b
parentde91276a5c90b9d3e42866054e48d255a37981b3 (diff)
downloadcpython-9f9193ec375ed0f366b4aabfe210e7fdc3eb6b7d.zip
cpython-9f9193ec375ed0f366b4aabfe210e7fdc3eb6b7d.tar.gz
cpython-9f9193ec375ed0f366b4aabfe210e7fdc3eb6b7d.tar.bz2
Error message in http.server code. Missed to update in 3.1 branch initially.
-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 8de604a..0cd8d35 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"