4.3.2.2 Request Members

connection
A connection object associated with this request. See Connection Object below for details. (Read-Only)

server
A server object associate with this request. See Server Object below for details. (Read-Only)

next
If this is an internal redirect, the request object we redirect to. (Read-Only)

prev
If this is an internal redirect, the request object we redirect from. (Read-Only)

main
If this is a sub-request, pointer to the main request. (Read-Only)

the_request
String containing the first line of the request. (Read-Only)

assbackwards
Is this an HTTP/0.9 "simple" request? (Read-Only)

header_only
A boolean value indicating HEAD request, as opposed to GET. (Read-Only)

protocol
Protocol, as given by the client, or "HTTP/0.9". Same as CGI SERVER_PROTOCOL. (Read-Only)

proto_num
Integer. Number version of protocol; 1.1 = 1001 (Read-Only)

request_time
A long integer. When request started. (Read-Only)

status_line
Status line. E.g. "200 OK". (Read-Only)

method
A string containing the method - 'GET', 'HEAD', 'POST', etc. Same as CGI REQUEST_METHOD. (Read-Only)

method_number
Integer containg the method number. (Read-Only)

allowed
Integer. A bitvector of the allowed methods. Used in relation with METHOD_NOT_ALLOWED. (Read-Only)

allowed_xmethods
Tuple. Allowed extension methods. (Read-Only)

allowed_methods
Tuple. List of allowed methods. Used in relation with METHOD_NOT_ALLOWED. This member can be modified via Request.allow_methods described in section 4.3.2. (Read-Only)

sent_body
Integer. Byte count in stream is for body. (?) (Read-Only)

bytes_sent
Long integer. Number of bytes sent. (Read-Only)

mtime
Long integer. Time the resource was last modified. (Read-Only)

boundary
String. Multipart/byteranges boundary. (Read-Only)

range
String. The Range: header. (Read-Only)

clength
Long integer. The "real" content length. (I.e. can only be used after the content's been read?) (Read-Only)

remaining
Long integer. Bytes left to read. (Only makes sense inside a read operation.) (Read-Only)

read_length
Long integer. Number of bytes read. (Read-Only)

read_body
Integer. How the request body should be read. (Read-Only)

read_chunked
Boolean. Read chunked transfer coding. (Read-Only)

expecting_100
Boolean. Is client waiting for a 100 (HTTP_CONTINUE) response. (Read-Only)

headers_in
A table object containing headers sent by the client.

headers_out
A table object representing the headers to be sent to the client.

err_headers_out
These headers get send with the error response, instead of headers_out.

subprocess_env
A table object containing environment information typically usable for CGI. You may have to call Request.add_common_vars first to fill in the information you need.

notes
A table object containing miscellaneous general purpose info that lives for as long as the request lives. Used internally by mod_python. If you need to pass data between handlers, it's better to simply add members to the Request object than to use notes.

content_type
String. The content type. Mod_python maintains an internal flag (Request._content_type_set) to keep track of whether content_type was set manually from within Python. The publisher handler uses this flag; when content_type isn't set, it attempts to guess the content type by examining the first few bytes of the output.

handler
The hame of the handler currently being processed. In all cases with mod_python, this should be "python-program". (Read-Only)

content_encoding
String. Content encoding. (Read-Only)

vlist_validator
Integer. Variant list validator (if negotiated). (Read-Only)

user
If an authentication check is made, this will hold the user name. Same as CGI REMOTE_USER. (Read-Only)

ap_auth_type
Authentication type. Same as CGI AUTH_TYPE. (Read-Only)

no_cache
Boolean. No cache if true. (Read-Only)

no_local_copy
Boolean. No local copy exists. (Read-Only)

unparsed_uri
The URL without any parsing performed. (Read-Only)

uri
The path portion of the URI. (Read-Only)

filename
String. File name being requested. (Read-Only)

path_info
String. What follows after the file name, but is before query args, if anything. Same as CGI PATH_INFO. (Read-Only)

parsed_uri
Tuple. The URI broken down into pieces. (scheme, hostinfo, user, password, hostname, port, path, query, fragment). The apache module defines a set of URI_* constants that should be used to access elements of this tuple. Example:
fname = req.parsed_uri[apache.URI_PATH]
(Read-Only)

finfo
Tuple. A file information structure, analogous to POSIX stat, describing the file pointed to by the URI. (valid, protection, user, group, inode, device, nlink, size, csize, atime, mtime, ctime, fname, name). The apache module defines a set of FINFO_* constants that should be used to access elements of this tuple. Example:
fname = req.finfo[apache.FINFO_FNAME]
(Read-Only)

args
String. Same as CGI QUERY_ARGS. (Read-Only)