Sun Java System Web Proxy Server 4.0.11 NSAPI Developer's Guide

request_header

The request_header function finds an entry in the pblock containing the client’s HTTP request headers (rq->headers). You must use this function rather than pblock_findval when accessing the client headers because the server might begin processing the request before the headers have been completely read.

Syntax

int request_header(char *name, char **value, Session *sn, Request *rq);

Returns

Returns REQ_PROCEED if the header was found, REQ_ABORTED if the header was not found, or REQ_EXIT if an error occurred reading from the client.

Parameters

char *name is the name of the header.

char **value is the address where the function will place the value of the specified header. If none is found, the function stores NULL.

Session *sn identifies the Session structure.

Request *rq identifies the Request structure.

The Session and Request parameters are the same as the parameters passed into your SAF.

See Also

request_create, request_free