Home | Trees | Indices | Help |
|
---|
|
WSGI-based webserver module. Includes a few built-in adapters for working with different WSGI servers.
If possible, an adapter will be automatically assigned to a WebServer instance - if not passed by the user.
For retrieving the available adapters, use get_available_adapters(). The results can be passed to the WebServer, e.g. WebServer(adapter=some_adapter) where some_adapter was retrieved with get_available_adapters().
|
|||
Request Request wrapper class. |
|||
Response Response wrapper class. |
|||
StaticFile Object that matches with a file and makes it available on the server. |
|||
Resource Represents a resource or a folder on the webserver. |
|||
CustomResource Same as Resource. |
|||
AdapterInterface Common interface for WSGI-servers adapters. |
|||
CherrypyAdapter Cherrypy WSGI server adapter. |
|||
PasteAdapter Paste WSGI server adapter. |
|||
CircuitsWebAdapter circuits.web WSGI server adapter. |
|||
WebServer Webserver class. |
|
|||
string |
|
||
string |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
log = log.getLogger('core.webserver')
|
|||
invalid_path_exists = 'path does not exist'
|
|||
invalid_path_abs = 'path must be absolute'
|
|||
invalid_path_dir = 'path must be a file'
|
|||
http_codes = {100: 'Continue', 101: 'Switching Protocols', 200
|
|||
chunks_size = 2** 16
|
|||
simple_template = '<html><head><title>%s</title><body>%s</body
|
|||
adapters = {'cherrypy': CherrypyAdapter, 'paste': PasteAdapter
|
|
Performs a simple response for a request. Usually used for returning errors or empty pages. For example, start_response(404, start_response, 'File not available on the server') will return a page to the user with the 404 status and this message on the body, wrapped in a simple html template.
Note: this function also sends the headers |
Performs a response for a request without wrapping in a html template.
Note: this function also sends the headers |
Based on a Range header and on the content length of a file, returns a list of byte ranges requested. Returns None if the header was invalid and an empty list in case of invalid range. Based on Cherrypy 3.1 implementation.
|
Generates chunks of a file. Stops when reaches the max_chunked value of generated chunks. |
Setups a response object for a single part response. Based on Cherrypy 3.1 implementation.
|
Setups a response object for a multi part response, based on the byte ranges requested. Based on Cherrypy 3.1 implementation.
|
Return the host on which a client can connect to the given listener. Copyright (c) 2002-2008, CherryPy Team (team@cherrypy.org) |
Raises an error if the given port is not free on the given host. Copyright (c) 2002-2008, CherryPy Team (team@cherrypy.org) |
|
http_codes
|
simple_template
|
adapters
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jun 9 22:24:56 2009 | http://epydoc.sourceforge.net |