Expand description
FastCGI 1.0 records, name-value pairs and CGI responses, shared by the responder and the client. Every length is checked against what the peer announced before anything is allocated for it.
Structs§
Constants§
- ABORT_
REQUEST - BEGIN_
REQUEST - CANT_
MPX_ CONN - DATA
- END_
REQUEST - GET_
VALUES - GET_
VALUES_ RESULT - HEADER_
LEN - KEEP_
CONN - MAX_
BODY_ BYTES - Request body (STDIN) and response (STDOUT) bound.
- MAX_
CONTENT - Largest content a record can carry; stream data is split at a multiple of 8 below it.
- MAX_
PAIRS - MAX_
PARAMS_ BYTES - Total bytes of name-value pairs accepted for one request’s PARAMS stream.
- MAX_
STDERR_ BYTES - OVERLOADED
- PARAMS
- REQUEST_
COMPLETE - ROLE_
AUTHORIZER - ROLE_
FILTER - ROLE_
RESPONDER - STDERR
- STDIN
- STDOUT
- UNKNOWN_
ROLE - UNKNOWN_
TYPE - VERSION
Functions§
- begin_
request - body_
text - Body bytes for an event: text when they are UTF-8, hex otherwise, and which.
- build_
cgi_ response - A CGI response (RFC 3875 §6):
Status:, the handler’s headers, a blank line, the body. - check_
headers - Header names are HTTP tokens; values carry no line breaks or other controls.
- decode_
body - Body bytes from an action’s
bodyandbody_encoding. - decode_
pairs - Decode name-value pairs. Names must be printable ASCII; values may be any bytes and are decoded lossily (a CGI value is text in practice).
- encode
- One record, padded to a multiple of 8 as the specification recommends.
- encode_
pairs - encode_
stream - A whole stream (PARAMS, STDIN, STDOUT, STDERR): as many records as it takes, then the empty record that ends it.
- end_
request - parse_
cgi_ response - Parse a CGI response: header lines up to the first blank line (CRLF or LF),
Status(default 200, or 302 with aLocation), the rest the body. - protocol_
status_ name - read_
record - Read one record.
Ok(None)is a clean end of stream at a record boundary. - unknown_
type