Commit b253c9f6 authored by Senthil Kumaran's avatar Senthil Kumaran

Fix issue11567: http.server DEFAULT_ERROR_MESSAGE format. Patch by Gennadiy Zlobin.

parent b52c0be4
...@@ -103,15 +103,20 @@ import copy ...@@ -103,15 +103,20 @@ import copy
# Default error message template # Default error message template
DEFAULT_ERROR_MESSAGE = """\ DEFAULT_ERROR_MESSAGE = """\
<head> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<title>Error response</title> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</head> <html xmlns="http://www.w3.org/1999/xhtml">
<body> <head>
<h1>Error response</h1> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<p>Error code %(code)d. <title>Error response</title>
<p>Message: %(message)s. </head>
<p>Error code explanation: %(code)s = %(explain)s. <body>
</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" DEFAULT_ERROR_CONTENT_TYPE = "text/html;charset=utf-8"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment