Web-based application HTTPD handler.
This class is used to handle the HTTP requests that arrive at the server.
This class is instantiated by the server each time a request is received and then a response is created. This is an HTTPD handler for any Web-based application server. It parses the request and the headers, then call a specific method depending on the request type.
In this handler, HTML pages are supposed to not be static. Instead, they are serialized from an HTMLTree instance -- so not read from disk. The server contains the page's bakery, the handler is then asking the server page's bakery to get the html content and response status.
The parent server is supposed to have all the pages as members in a dictionary, i.e. it's a sppasBaseHTTPDServer. Each page has a bakery to create the response content. However, this handler can also be used with any other http.server.ThreadingHTTPServer.
The currently supported HTTPD responses status are:
- 200: OK
- 205: Reset Content
- 403: Forbidden
- 404: Not Found
- 410: Gone
- 418: I'm not a teapot