Class Protocols.HTTP.Server.Request
- Description
This class represents a connection from a client to the server.
There are three different read callbacks that can be active, which have the following call graphs.
read_cb
is the default read callback, installed byattach_fd
.| (Incoming data) v read_cb | If complete headers are read v parse_request v parse_variables | If callback isn't changed to read_cb_chunked or read_cb_post v finalize
| (Incoming data) v read_cb_post | If enough data has been received v finalize
| (Incoming data) v read_cb_chunked | If all data chunked transfer-encoding needs v finalize
- Variable
body_raw
string
Protocols.HTTP.Server.Request.body_raw- Description
raw unparsed body of the request (raw minus request line and headers)
- Variable
connection_timeout_delay
int
Protocols.HTTP.Server.Request.connection_timeout_delay- Description
connection timeout, delay until connection is closed while waiting for the correct headers:
- Variable
cookies
mapping
(string
:string
) Protocols.HTTP.Server.Request.cookies- Description
cookies set by client
- Variable
full_query
string
Protocols.HTTP.Server.Request.full_query- Description
full resource requested, including attached GET query
- Variable
my_fd
Stdio.NonblockingStream
Protocols.HTTP.Server.Request.my_fd- Description
The socket that this request came in on.
- Variable
not_query
string
Protocols.HTTP.Server.Request.not_query- Description
resource requested minus any attached query
- Variable
protocol
string
Protocols.HTTP.Server.Request.protocol- Description
request protocol and version, eg. HTTP/1.0
- Variable
query
string
Protocols.HTTP.Server.Request.query- Description
query portion of requested resource, starting after the first "?"
- Variable
raw
string
Protocols.HTTP.Server.Request.raw- Description
raw unparsed full request (headers and body)
- Variable
request_headers
mapping
(string
:string
|array
(string
)) Protocols.HTTP.Server.Request.request_headers- Description
all headers included as part of the HTTP request, ie content-type.
- Variable
request_raw
string
Protocols.HTTP.Server.Request.request_raw- Description
full request line (request_type + full_query + protocol)
- Variable
request_type
string
Protocols.HTTP.Server.Request.request_type- Description
HTTP request method, eg. POST, GET, etc.
- Variable
response
mapping
Protocols.HTTP.Server.Request.response- Description
the response sent to the client (for use in the log_cb)
- Variable
send_timeout_delay
int
Protocols.HTTP.Server.Request.send_timeout_delay- Description
send timeout (no activity for this period with data in send buffer) in seconds, default is 180