httpResponses.py
Go to the documentation of this file.
1 import string
2 
3 gHTTPResponses = {
4  100: "Continue",
5  101: "Switching Protocols",
6  200: "OK",
7  201: "Created",
8  202: "Accepted",
9  203: "Non-Authoritative Information",
10  204: "No Content",
11  205: "Reset Content",
12  206: "Partial Content",
13  300: "Multiple Choices",
14  301: "Moved Permanently",
15  302: "Moved Temporarily",
16  303: "See Other",
17  304: "Not Modified",
18  305: "Use Proxy",
19  400: "Bad Request",
20  401: "Unauthorized",
21  402: "Payment Required",
22  403: "Forbidden",
23  404: "Not Found",
24  405: "Method Not Allowed",
25  406: "Not Acceptable",
26  407: "Proxy Authentication Required",
27  408: "Request Time-out",
28  409: "Conflict",
29  410: "Gone",
30  411: "Length Required",
31  412: "Precondition Failed",
32  413: "Request Entity Too Large",
33  414: "Request-URI Too Large",
34  415: "Unsupported Media Type",
35  500: "Internal Server Error",
36  501: "Not Implemented",
37  502: "Bad Gateway",
38  503: "Service Unavailable",
39  504: "Gateway Time-out",
40  505: "HTTP Version not supported"
41  }
42 
43 # Default error message
44 errorMessage_Default = \
45 """
46 <html><head>
47 <title><?cs var:code?> <?cs var:message?></title>
48 </head><body>
49 <h1><?cs var:message ?></h1>
50 <p>Error code <?cs var:code ?>.
51 <p>Message: <?cs var:message ?>.
52 <p>Reason:\n <pre><?cs var:reason?></pre>
53 <hr />
54 <?cs each:_e=environ ?>
55  <?cs name:_e ?>=<?cs var:_e ?><br>
56 <?cs /each ?>
57 </body></html>
58 """
59 
60 errorMessage_404 = \
61 """
62 <html><head>
63 <title><?cs var:code?> <?cs var:message?></title>
64 </head><body>
65 <h1>Not Found</h1>
66 <p>The requested URL <?cs var:environ.REQUEST_URI?> was not found on this server.</p>
67 <hr />
68 <?cs each:_e=environ ?>
69  <?cs name:_e ?>=<?cs var:_e ?><br>
70 <?cs /each ?>
71 </body></html>
72 """


pyclearsilver
Author(s): Scott Noob Hassan
autogenerated on Mon Jun 10 2019 15:51:13