Package wsgitools :: Module applications :: Class StaticContent
[hide private]
[frames] | no frames]

Class StaticContent

source code

This wsgi application provides static content on whatever request it receives with method GET or HEAD (content stripped). If not present, a content-length header is computed.

Instance Methods [hide private]
 
__init__(self, status, headers, content, anymethod=False) source code
 
__call__(self, environ, start_response)
wsgi interface
source code
Method Details [hide private]

__init__(self, status, headers, content, anymethod=False)
(Constructor)

source code 
Parameters:
  • status (str) - is the HTTP status returned to the browser (ex: "200 OK")
  • headers (list) - is a list of (header, value) pairs being delivered as HTTP headers
  • content (basestring) - contains the data to be delivered to the client. It is either a string or some kind of iterable yielding strings.
  • anymethod (boolean) - determines whether any request method should be answered with this response instead of a 501