Package cherrypy :: Module _cpwsgi_server :: Class CPHTTPRequest
[hide private]
[frames] | no frames]

Class CPHTTPRequest

source code

            object --+    
                     |    
wsgiserver.HTTPRequest --+
                         |
                        CPHTTPRequest

An HTTP Request (and response).

A single HTTP connection may consist of multiple request/response pairs.

send: the 'send' method from the connection's socket object.
wsgi_app: the WSGI application to call.
environ: a partial WSGI environ (server and connection entries).
    The caller MUST set the following entries:
    * All wsgi.* entries, including .input
    * SERVER_NAME and SERVER_PORT
    * Any SSL_* entries
    * Any custom entries like REMOTE_ADDR and REMOTE_PORT
    * SERVER_SOFTWARE: the value to write in the "Server" response header.
    * ACTUAL_SERVER_PROTOCOL: the value to write in the Status-Line of
        the response. From RFC 2145: "An HTTP server SHOULD send a
        response version equal to the highest version for which the
        server is at least conditionally compliant, and whose major
        version is less than or equal to the one received in the
        request.  An HTTP server MUST NOT send a version for which
        it is not at least conditionally compliant."

outheaders: a list of header tuples to write in the response.
ready: when True, the request has been parsed and is ready to begin
    generating the response. When False, signals the calling Connection
    that the response should not be generated and the connection should
    close.
close_connection: signals the calling Connection that the request
    should close. This does not imply an error! The client and/or
    server may each request that the connection be closed.
chunked_write: if True, output will be encoded with the "chunked"
    transfer-coding. This value is set automatically inside
    send_headers.

Instance Methods [hide private]
 
__init__(self, sendall, environ, wsgi_app)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from wsgiserver.HTTPRequest: decode_chunked, parse_request, read_headers, respond, send_headers, simple_response, start_response, write

Inherited from wsgiserver.HTTPRequest (private): _parse_request, _respond

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from wsgiserver.HTTPRequest: max_request_body_size, max_request_header_size

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sendall, environ, wsgi_app)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)