Request information object
The request information object contains information about the actual
request being processed. The header information sent by the browser is
present, as well as information added by various modules. Since the
request information object is sent to every module and callback method
involved in handling the request it is a perfect place for
intra-module communication.
Note that there are actually different request information object
for different protocols. To the programmer they try to look the same,
but some slight differences might show up.
The members of the request information object are:
- conf
-
virtual server configuration object. This field is not necessarily
available when running ordinary Pike scripts.
- variables
-
a mapping containing all form variables sent in the request, as well
as any additional variables created by modules or RXML tags.
- supports
-
a multiset containing the features the current browser supports. See
the supports chapter in the
creator manual for more information.
- pragma
-
contains a multiset with information sent by the HTTP header Pragma.
no-cache is a important value, since that mean that the request
should be fetched without caching.
- id->misc
-
a mapping available to store miscellaneous information. Usually used
for intra-module communication or communication between different tags
in the same module. Beware that the name space of this mapping is
getting very cluttered, take care to choose names that will likely
remain unique before storing things here.
- raw
-
a string containing the the entire raw client request.
- query
-
a string containing the query part of the URL. It is usually easier to
get information from the variables mapping.
- not_query
-
a string containing the path part of the URL.
- raw_url
-
a string containing the whole URL. Note that usually the URL as seen
by the web server does only contain the path and query part. Full URLs
are only used for proxy requests.
- auth
-
an array containing authentification information. If an
authentification module is present it will contain an array of the
format; ({ successp, username, password }) where successp is
one if the user succeeded in authentificating and zero otherwise. The
password will not be available if the user succeeded in
authentificating herself.
If there are no authentification module present auth will
contain an array of the format; ({ "Basic", basic_auth_info
}) where basic auth info contains a string with the user name and
password, separated by colon.
- remoteaddr
-
a string containing the numeric IP address of the client machine.
- clientprot
-
a string containing the protocol version used by the client when
issuing the request.
- method
-
a string containing the access method specified by the client. This is
usually GET, or sometimes POST when forms are being used. It can also
have other values if you allow methods like PUT, user ftp or use
special protocols such as WebDAV, may try to use various other methods
as well.
- request_headers
-
a mapping containing the HTTP headers that the client submitted when
issuing the request.
- my_fd
-
is a Stdio.File object containing the actual network connection to the
browser.
|