Go to the documentation of this file.00001 import string
00002
00003 gHTTPResponses = {
00004 100: "Continue",
00005 101: "Switching Protocols",
00006 200: "OK",
00007 201: "Created",
00008 202: "Accepted",
00009 203: "Non-Authoritative Information",
00010 204: "No Content",
00011 205: "Reset Content",
00012 206: "Partial Content",
00013 300: "Multiple Choices",
00014 301: "Moved Permanently",
00015 302: "Moved Temporarily",
00016 303: "See Other",
00017 304: "Not Modified",
00018 305: "Use Proxy",
00019 400: "Bad Request",
00020 401: "Unauthorized",
00021 402: "Payment Required",
00022 403: "Forbidden",
00023 404: "Not Found",
00024 405: "Method Not Allowed",
00025 406: "Not Acceptable",
00026 407: "Proxy Authentication Required",
00027 408: "Request Time-out",
00028 409: "Conflict",
00029 410: "Gone",
00030 411: "Length Required",
00031 412: "Precondition Failed",
00032 413: "Request Entity Too Large",
00033 414: "Request-URI Too Large",
00034 415: "Unsupported Media Type",
00035 500: "Internal Server Error",
00036 501: "Not Implemented",
00037 502: "Bad Gateway",
00038 503: "Service Unavailable",
00039 504: "Gateway Time-out",
00040 505: "HTTP Version not supported"
00041 }
00042
00043
00044 errorMessage_Default = \
00045 """
00046 <html><head>
00047 <title><?cs var:code?> <?cs var:message?></title>
00048 </head><body>
00049 <h1><?cs var:message ?></h1>
00050 <p>Error code <?cs var:code ?>.
00051 <p>Message: <?cs var:message ?>.
00052 <p>Reason:\n <pre><?cs var:reason?></pre>
00053 <hr />
00054 <?cs each:_e=environ ?>
00055 <?cs name:_e ?>=<?cs var:_e ?><br>
00056 <?cs /each ?>
00057 </body></html>
00058 """
00059
00060 errorMessage_404 = \
00061 """
00062 <html><head>
00063 <title><?cs var:code?> <?cs var:message?></title>
00064 </head><body>
00065 <h1>Not Found</h1>
00066 <p>The requested URL <?cs var:environ.REQUEST_URI?> was not found on this server.</p>
00067 <hr />
00068 <?cs each:_e=environ ?>
00069 <?cs name:_e ?>=<?cs var:_e ?><br>
00070 <?cs /each ?>
00071 </body></html>
00072 """