There isn’t much here yet. Maybe you can help?
Each HTTP request produces a UserRequest
associated with a UserSession.
Sessions are tightly coupled with PHP24;
an existing PHP session is expected,
as identified by the ‘PHPSESSID’ cookie.
Sessions are shared via Memcache
If a session is not found (or is invalid),
500 status code is returned and the
HTTP request is aborted.
Requests are subject to a 120 second timeout,
after which the request will be served an HTTP
Note that this does not stop background processing—this timeout exists to prevent the user from hanging indefinitely.
If a process intends to perform background processing for any length of time (longer than a few seconds), it should complete the request as quickly as possible and use some other mechanism to report back progress (e.g. polling).
The UserRequest exposes raw request data with minor processing.
The path component of the URI. The method name is unfortunate.
Query string processed into a key/value object. Despite the name, this is also populated if non-GET requests contain query strings.
POST data processed into an object as if it were a query string
Since this requires data that is streamed asynchronously,
this method takes a callback that waits for all data to become
if the data are already available,
it is immediately invoked with the processed POST data.
Cookies parsed into a key/value object.
IP address of the origin of the request. If the server is behind a proxy that sets the ‘X-Forwarded-For’ header, it is used instead.
Hostname of the server. If the server is behind a proxy that sets the ‘X-Forwarded-Host’ header, it is used instead.
Origin of request. Only available if at lease one of the ‘Origin’ or ‘Referer’ headers are set. This is useful mainly for determining the protocol and host while behind a proxy.
The user agent string of the request.
The user’s unique session id (‘PHPSESSID’).
The name of the cookie from which the session ID originated (hard-coded to ‘PHPSESSID’).
TODO: Document return format and writing response data.