The rq parameter is a pointer to a request data structure. This parameter contains variables related to the current request, such as the request headers, URI, and local file system path. The same request pointer is passed to each SAF called in the request-response process for an HTTP request.
The following list describes the most important fields in this data structure. See Chapter 4, NSAPI Function Reference for information about NSAPI routines for manipulating the request data structure.
Pointer to a pblock containing the server’s working variables. This pblock includes anything not specifically found in the other three pblocks. The contents of this pblock vary depending on the specific request and the type of SAF. For example, an AuthTrans SAF might insert an auth-user parameter into rq->vars that can be used subsequently by a PathCheck SAF.
Pointer to a pblock containing elements of the HTTP request. This pblock includes the HTTP method (GET, POST, and so on), the URI, the protocol (normally HTTP/1.0), and the query string. This pblock does not normally change throughout the request-response process.
While obtaining the query string associated with a request, the query string is stored in reqpb pblock of the request structure only if the request URL is relative. If the request URL is absolute, the query string is not separated.
Pointer to a pblock containing all of the request headers, such as User-Agent, If-Modified-Since, and so on, received from the client in the HTTP request. See Chapter 8, Hypertext Transfer Protocol for more information about request headers. This pblock does not normally change throughout the request-response process.
Pointer to a pblock containing the response headers, such as Server, Date, Content-Type, Content-Length, and so on, to be sent to the client in the HTTP response. See Chapter 8, Hypertext Transfer Protocol for more information about response headers.
The rq parameter is the primary mechanism for passing information throughout the request-response process. On input to a SAF, rq contains the values that were inserted or modified by previously executed SAFs. On output, rq contains any modifications or additional information inserted by the SAF. Some SAFs depend on the existence of specific information provided at an earlier step in the process. For example, a PathCheck SAF retrieves values in rq->vars that were previously inserted by an AuthTrans SAF.