Trees | Index | Help |
---|
Package shttp :: Module sHTTP :: Class HTTP |
|
HTTPBase
--+
|
HTTP
Method Summary | |
---|---|
Initialize the HTTP server, uses the socket |reqsocket| and uses |handlers| (a dictionary methodname -> handlerfunction) as handlers to methods. | |
__del__(self)
| |
Header error manager | |
init_request(self)
| |
Request error manager | |
Resolve a request using handlers, if there is no handler, it responses with 405 error | |
send_headers(self,
headers,
status)
| |
Send a page with data |stringdata|, headers |headers|, and the status |status| (default OK: 200) | |
Send the first line with the response of the request |httpversion| is the version of the http response |status| the reponse status |status_string| a human readable status | |
set_servername(self,
servername)
| |
Inherited from HTTPBase | |
Get the |v| HTTP header | |
close the Object | |
| |
Return the content of the document (a POST in the server, a response int the client) | |
The version of the HTTP used | |
What method is used to communicate (i.e. | |
The URI or requested location | |
Send the headers, including the response|request | |
Read the headers and the (response status|request) | |
Change the socket that connecs peers | |
| |
| |
|
Method Details |
---|
__init__(self,
reqsocket,
handlers=None)
Initialize the HTTP server, uses the socket |reqsocket| and uses
|handlers| (a dictionary methodname -> handlerfunction) as handlers
to methods. An URI handler can be used inside the method handler.
|
header_error(self, string)Header error manager
|
request_error(self, string)Request error manager
|
resolve(self)Resolve a request using handlers, if there is no handler, it responses with 405 error |
send_page(self, stringdata, headers=None, status=200)Send a page with data |stringdata|, headers |headers|, and the status |status| (default OK: 200) |
send_response_header(self, httpversion='HTTP/1.1', status=200, status_string=None)Send the first line with the response of the request |httpversion| is the version of the http response |status| the reponse status |status_string| a human readable status |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sat Oct 14 11:50:52 2006 | http://epydoc.sf.net |