The Request data structure describes an HTTP transaction, for example, the variables include the client's HTTP request headers.
typedef struct{ */Server working variables */ pblock *vars; /* The method, URI, and protocol revision of this request */ pblock *reqpb; /* Protocol specific headers */ int loadhdrs; pblock *headers; /* Server's response headers */ int senthdrs; pblock *srvhdrs; /* The object set constructed to fulfill this request */ httpd_objset *os; } Request;
The following list describes the most important fields in the Request data structure:
vars— Pointer to a pblock containing information about request-response processing. SAFs may modify the contents of this pblock according to the rules established in Required Behavior of SAFs for Each Directive.
reqpb — Pointer to a pblock containing information about the client's HTTP request. The method parameter contains the HTTP request method, the uri parameter contains the path portion of the requested URI, the optional query parameter contains any query string from the requested URI, and the protocol parameter contains the HTTP protocol version. Do not modify the contents of this pblock.
headers — Pointer to a pblock containing the client's HTTP request headers. By convention, all parameter names are lowercase. Do not modify the contents of this pblock.
senthdrs — Indicates whether the server has sent HTTP response headers. Service SAFs may set rq->senthdrs = 1 to prevent the server from sending HTTP response headers.
srvhdrs — Pointer to a pblock containing the server's HTTP response headers. By convention, all parameter names are lowercase. SAFs and filters may modify the contents of this pblock.
The Request NSAPI data structure cannot be used concurrently by multiple threads. Do not retain any references to a Request or its contents after processing of the current request.