WebUtils.HTTPStatusCodes | index /usr/local/share/webware/WebUtils/HTTPStatusCodes.py

`HTTPStatusCodes.py
TO DO
@@ document
@@ 2000-04-17 ce: Is there an RFC for this?
DONE
* 2000-05-08 ce: Incorporated Matt Schinkel's (matt@null.net) re.sub()
for stripping HTML tags in the ASCII version of the HTTP msg.`

Modules
`` |  |
re |  |  |

Functions
`` |  | HTMLTableOfHTTPStatusCodes(codes=[(100, 'CONTINUE', 'The client can continue.'), (101, 'SWITCHING_PROTOCOLS', 'The server is switching protocols according to Upgrade header.'), (200, 'OK', 'The request succeeded normally.'), (201, 'CREATED', 'The request succeeded and created a new resource on the server.'), (202, 'ACCEPTED', 'The request was accepted for processing, but was not completed.'), (203, 'NON_AUTHORITATIVE_INFORMATION', 'The meta information presented by the client did not originate from the server.'), (204, 'NO_CONTENT', 'The request succeeded but that there was no new information to return.'), (205, 'RESET_CONTENT', 'The agent <em>SHOULD</em> reset the document view which caused the request to be sent.'), (206, 'PARTIAL_CONTENT', 'The server has fulfilled the partial GET request for the resource.'), (300, 'MULTIPLE_CHOICES', 'The requested resource corresponds to any one of...esentations, each with its own specific location.'), (301, 'MOVED_PERMANENTLY', 'The resource has permanently moved to a new loca...erences should use a new URI with their requests.'), (302, 'MOVED_TEMPORARILY', 'The resource has temporarily moved to another lo...till use the original URI to access the resource.'), (303, 'SEE_OTHER', 'The response to the request can be found under a different URI.'), (304, 'NOT_MODIFIED', 'A conditional GET operation found that the resource was available and not modified.'), (305, 'USE_PROXY', 'The requested resource <em>MUST</em> be accessed...iven by the <code><em>Location</em></code> field.'), (400, 'BAD_REQUEST', 'The request sent by the client was syntactically incorrect.'), (401, 'UNAUTHORIZED', 'The request requires HTTP authentication.'), (402, 'PAYMENT_REQUIRED', 'Reserved for future use.'), (403, 'FORBIDDEN', 'The server understood the request but refused to fulfill it.'), (404, 'NOT_FOUND', 'The requested resource is not available.'), ...], tableArgs='align=center border=2', rowArgs='valign=top', colArgs='', headingTag='th', headingArgs='') `Returns an HTML string containing all the status code information as provided by this module. It's highly recommended that if pass arguments to this function, that you do so by keyword. FUTURE: Allow font specs.`

Data
`` |  | HTTPStatusCodeList = [(100, 'CONTINUE', 'The client can continue.'), (101, 'SWITCHING_PROTOCOLS', 'The server is switching protocols according to Upgrade header.'), (200, 'OK', 'The request succeeded normally.'), (201, 'CREATED', 'The request succeeded and created a new resource on the server.'), (202, 'ACCEPTED', 'The request was accepted for processing, but was not completed.'), (203, 'NON_AUTHORITATIVE_INFORMATION', 'The meta information presented by the client did not originate from the server.'), (204, 'NO_CONTENT', 'The request succeeded but that there was no new information to return.'), (205, 'RESET_CONTENT', 'The agent <em>SHOULD</em> reset the document view which caused the request to be sent.'), (206, 'PARTIAL_CONTENT', 'The server has fulfilled the partial GET request for the resource.'), (300, 'MULTIPLE_CHOICES', 'The requested resource corresponds to any one of...esentations, each with its own specific location.'), (301, 'MOVED_PERMANENTLY', 'The resource has permanently moved to a new loca...erences should use a new URI with their requests.'), (302, 'MOVED_TEMPORARILY', 'The resource has temporarily moved to another lo...till use the original URI to access the resource.'), (303, 'SEE_OTHER', 'The response to the request can be found under a different URI.'), (304, 'NOT_MODIFIED', 'A conditional GET operation found that the resource was available and not modified.'), (305, 'USE_PROXY', 'The requested resource <em>MUST</em> be accessed...iven by the <code><em>Location</em></code> field.'), (400, 'BAD_REQUEST', 'The request sent by the client was syntactically incorrect.'), (401, 'UNAUTHORIZED', 'The request requires HTTP authentication.'), (402, 'PAYMENT_REQUIRED', 'Reserved for future use.'), (403, 'FORBIDDEN', 'The server understood the request but refused to fulfill it.'), (404, 'NOT_FOUND', 'The requested resource is not available.'), ...] HTTPStatusCodeListColumnNames = ('Code', 'Identifier', 'Description') HTTPStatusCodes = {100: {'asciiMsg': 'The client can continue.', 'code': 100, 'htmlMsg': 'The client can continue.', 'identifier': 'CONTINUE'}, 101: {'asciiMsg': 'The server is switching protocols according to Upgrade header.', 'code': 101, 'htmlMsg': 'The server is switching protocols according to Upgrade header.', 'identifier': 'SWITCHING_PROTOCOLS'}, 200: {'asciiMsg': 'The request succeeded normally.', 'code': 200, 'htmlMsg': 'The request succeeded normally.', 'identifier': 'OK'}, 201: {'asciiMsg': 'The request succeeded and created a new resource on the server.', 'code': 201, 'htmlMsg': 'The request succeeded and created a new resource on the server.', 'identifier': 'CREATED'}, 202: {'asciiMsg': 'The request was accepted for processing, but was not completed.', 'code': 202, 'htmlMsg': 'The request was accepted for processing, but was not completed.', 'identifier': 'ACCEPTED'}, 203: {'asciiMsg': 'The meta information presented by the client did not originate from the server.', 'code': 203, 'htmlMsg': 'The meta information presented by the client did not originate from the server.', 'identifier': 'NON_AUTHORITATIVE_INFORMATION'}, 204: {'asciiMsg': 'The request succeeded but that there was no new information to return.', 'code': 204, 'htmlMsg': 'The request succeeded but that there was no new information to return.', 'identifier': 'NO_CONTENT'}, 205: {'asciiMsg': 'The agent SHOULD reset the document view which caused the request to be sent.', 'code': 205, 'htmlMsg': 'The agent <em>SHOULD</em> reset the document view which caused the request to be sent.', 'identifier': 'RESET_CONTENT'}, 206: {'asciiMsg': 'The server has fulfilled the partial GET request for the resource.', 'code': 206, 'htmlMsg': 'The server has fulfilled the partial GET request for the resource.', 'identifier': 'PARTIAL_CONTENT'}, 300: {'asciiMsg': 'The requested resource corresponds to any one of...esentations, each with its own specific location.', 'code': 300, 'htmlMsg': 'The requested resource corresponds to any one of...esentations, each with its own specific location.', 'identifier': 'MULTIPLE_CHOICES'}, ...} code = 505 dict = {'asciiMsg': 'The server does not support or refuses to suppor...col version that was used in the request message.', 'code': 505, 'htmlMsg': 'The server does not support or refuses to suppor...col version that was used in the request message.', 'identifier': 'HTTP_VERSION_NOT_SUPPORTED'} htmlMsg = 'The server does not support or refuses to suppor...col version that was used in the request message.' identifier = 'HTTP_VERSION_NOT_SUPPORTED' record = (505, 'HTTP_VERSION_NOT_SUPPORTED', 'The server does not support or refuses to suppor...col version that was used in the request message.')