module Request: sig
.. end
type
t
Type representing the information contained in one request
of the web server.
type
role =
| |
Responder |
| |
Authorizer |
| |
Filter |
Possible roles of the CGI script
type
gateway =
| |
CGI of int * int |
| |
FCGI of int |
CGI or FCGI script
val gateway : t -> gateway
The type and version of the CGI used.
val role : t -> role
The role of the script.
val path_info : t -> string
Returns the PATH_INFO, that is the portion of the URI
following the script name but preceding the query data. "/"
represent a single void path segment. The CGI specifications
recommend to return "404 Not Found" if path_info <> "" but is
not used.
val protocol : t -> string
The protocol of the request, in uppercase. E.g. "HTTP/1.1".
val remote_addr : t -> string
The IP adress of the client making the request. Note it can
be the one of a proxy in the middle.
val server_name : t -> string
Name of the server, derived from the host part of the script URI.
val server_port : t -> int
The port on which the request was received.
val server_software : t -> string
The name and version of the web server software answering the
request.
val accept : t -> string
Returns the list of accepted MIME types by the client.
val accept_charset : t -> string
Return a list of charset supported by the client.
val accept_encoding : t -> string
List of encodings supported by the client.
val auth : t -> string
The HTTP authentication scheme. E.g. "Basic". See section 11
of the HTTP/1.1 specification for more details.
val user : t -> string
The user-ID supplied when auth r = "Basic"
.
val user_agent : t -> string
The identification of the client browser.
val metavar : t -> string -> string
metavar r name
returns the value of the CGI metavariable
name
for the request r
. (Remember that CGI does not
distinguish between nonexisting arguments and arguments with
value ""
.)
val print_string : t -> string -> unit
val prerr_string : t -> string -> unit