Trees | Indices | Help |
|
---|
|
Manage the invocation of a WSGI application
|
|||
wsgi_file_wrapper Wrapper to convert file-like objects to iterables |
|||
headers_class Manage a collection of HTTP response headers |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
wsgi_version =
|
|||
wsgi_multithread = True
|
|||
wsgi_multiprocess = True
|
|||
wsgi_run_once = False
|
|||
origin_server = True
|
|||
http_version =
|
|||
server_software = None
|
|||
os_environ =
|
|||
traceback_limit = None
|
|||
error_status =
|
|||
error_headers =
|
|||
error_body =
|
|||
result = None
|
|||
status = None
|
|||
headers_sent = False
|
|||
headers = None
|
|||
bytes_sent = 0
|
|
Send any iterable data, then close self and the iterable Subclasses intended for use in asynchronous servers will want to redefine this method, such that it sets up callbacks in the event loop to iterate over the data, and to call 'self.close()' once the response is finished. |
Make any necessary header changes or defaults Subclasses can extend this to add other defaults. |
Platform-specific file transmission Override this method in subclasses to support platform-specific file transmission. It is only called if the application's return iterable ('self.result') is an instance of 'self.wsgi_file_wrapper'. This method should return a true value if it was able to actually transmit the wrapped file-like object using a platform-specific approach. It should return a false value if normal iteration should be used instead. An exception can be raised to indicate that transmission was attempted, but failed. NOTE: this method should call 'self.send_headers()' if 'self.headers_sent' is false and it is going to attempt direct transmission of the file. |
Close the iterable (if needed) and reset all instance vars Subclasses may want to also drop the client connection. |
Log the 'exc_info' tuple in the server log Subclasses may override to retarget the output or change its format. |
WSGI mini-app to create error output By default, this just uses the 'error_status', 'error_headers', and 'error_body' attributes to generate an output page. It can be overridden in a subclass to dynamically generate diagnostics, choose an appropriate message for the user's preferred language, etc. Note, however, that it's not recommended from a security perspective to spit out diagnostics to any old user; ideally, you should have to do something special to enable diagnostic output, which is why we don't include any here! |
Override in subclass to buffer data for send to client It's okay if this method actually transmits the data; BaseHandler just separates write and flush operations for greater efficiency when the underlying system actually has such a distinction. |
Override in subclass to force sending of recent '_write()' calls It's okay if this method is a no-op (i.e., if '_write()' actually sends the data. |
|
os_environ
|
error_body
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Tue Jan 29 22:44:28 2008 | http://epydoc.sourceforge.net |