For each request a filter object gets created. The environment is then
passed through filter_environ. Possible exceptions are filtered by filter_exc_info. After that for each (header,
value) tuple filter_header is used. The resulting list is filtered
through filter_headers. Any data is filtered through filter_data. In order to possibly append data the append_data method is invoked. When the request has
finished handle_close is invoked.
|
|
|
|
{str: str}
|
filter_environ(self,
environ)
Receives a dict with the environment passed to the wsgi application
and a dict must be returned. |
source code
|
|
|
|
filter_exc_info(self,
exc_info)
Receives either None or a tuple passed as third argument
to start_response from the wrapped wsgi application. |
source code
|
|
|
str
|
filter_status(self,
status)
Receives a status string passed as first argument to
start_response from the wrapped wsgi application. |
source code
|
|
|
(str, str)
|
filter_header(self,
headername,
headervalue)
This function is invoked for each (headername,
headervalue) tuple in the second argument to the
start_response from the wrapped wsgi application. |
source code
|
|
|
[(str, str)]
|
filter_headers(self,
headers)
A list of headers passed as the second argument to the
start_response from the wrapped wsgi application is
passed to this function and such a list must also be returned. |
source code
|
|
|
bytes
|
filter_data(self,
data)
For each string that is either written by the write
callable or returned from the wrapped wsgi application this method is
invoked. |
source code
|
|
|
gen([bytes])
|
|
|
|
handle_close(self)
This method is invoked after the request has finished. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|