1 The CONNECTION Object

The CONNECTION object contains (duh) information that pertains to the current web request/response (i.e. connection).

env
The CGI-like environment dictionary.
browser
A Browser object that contains...
method
The request method (same as env['REQUEST_METHOD']).
host
The hostname sent in the request headers.
args
The query arguments (either for GET or POST).
requestHeaders
A dictionary of request headers.
responseHeaders
A dictionary of headers to send in the response.
requestCookie
A Cookie1 object corresponding to the cookie sent by the client.
responseCookie
A Cookie object representing the cookie to be sent to the client.
uri
The URI of the request. This URI may have been subject to rewriting2 and may not be the URI as the client sent it.
realUri
The URI of the request. This URI has not been subject to the same rewriting as uri. This is the URI as sent by the client.
extract_args
See (see section 2.5, page ).
setContentType
A method taking a singe string argument that is a shortcut to set the Content-Type header.
setStatus
A method taking a single numeric status value for the HTTP response.
redirect
Takes a single URL argument which is the URL to redirect to.



Footnotes

...Cookie1
see the documentation for the Cookie module in the Python Library Reference
... rewriting2
Either via the rewrite service or other means