CGIHttpRequest

Subclass of HttpRequest for HTTP requests received via CGI.

Constructors

this
this(CGIRequest cgi)

Construct the HTTP request from a CGI request.

Members

Variables

cgiVars
CGIVars cgiVars;

CGI meta-variables.

Inherited Members

From HttpRequest

method
string method;

HTTP method, e.g., "GET".

proxy
string proxy;

If this request is going through a HTTP proxy server, this should be set to its address.

resource
string resource [@property getter]

Resource part of URL (everything after the hostname)

resource
string resource [@property setter]

Set the resource part of the URL, or the entire URL. Setting the resource to a full URL will fill in the Host header, as well.

host
string host [@property getter]

The hostname, without the port number

host
string host [@property setter]

Sets the hostname (and the "Host" header). Must not include a port number. Does not change the previously-set port number.

protocolDefaultPort
ushort protocolDefaultPort [@property getter]

Retrieves the default port number for the currently set protocol.

port
ushort port [@property getter]

Port number, from "Host" header. Defaults to protocolDefaultPort.

port
ushort port [@property setter]

Sets the port number. If it is equal to protocolDefaultPort, then it is not included in the "Host" header.

path
string path [@property getter]

Path part of request (until the '?').

queryString
string queryString [@property getter]
string queryString [@property setter]

Query string part of request (atfer the '?').

urlParameters
UrlParameters urlParameters [@property getter]
UrlParameters urlParameters [@property setter]

The query string parameters.

root
string root [@property getter]

URL without resource (protocol, host and port).

url
string url [@property getter]

Full URL.

baseURL
string baseURL [@property getter]

Full URL without query parameters or fragment.

proxyHost
string proxyHost [@property getter]

The hostname part of the proxy address, if any.

proxyPort
ushort proxyPort [@property getter]

The port number of the proxy address if it specified, otherwise 80.

parseRequestLine
void parseRequestLine(string reqLine)

Parse the first line in a HTTP request ("METHOD /resource HTTP/1.x").

decodePostData
UrlParameters decodePostData()

Decodes submitted form data, and returns an AA of values.

remoteHosts
deprecated string[] remoteHosts(string remoteHost)

Get list of hosts as specified in headers (e.g. X-Forwarded-For). First item in returned array is the node furthest away. Duplicates are removed. Specify socket remote address in remoteHost to add it to the list.

getCookies
string[string] getCookies()

Basic cookie parsing

Meta