Microsoft Internet Security and Acceleration Server 2004 SDK

SetHeader

The SetHeader callback function is used by Web filters to modify or delete the value of a header or to add a new header. The function can also be used to modify the special values included in the request or status line.

The SetHeader callback function is declared as:

BOOL WINAPI * SetHeader(
  struct _HTTP_FILTER_CONTEXT* pfc,
  LPSTR lpszName ,
  LPSTR lpszValue 
);

Parameters

pfc
Pointer to the HTTP_FILTER_CONTEXT data structure that is associated with the current, active HTTP session. Pass the filter context in this parameter.
lpszName

Pointer to a null-terminated string containing the name of the header to modify or delete. Header names should include the trailing colon (:). This parameter is not case-sensitive.

The special values "method", "url", "version", and "body" (for requests only) can be used to set individual portions of the request line. When the value "body" is specified, the function sets the part of the body that has already been received.

The special value "status" can be used to set the status in the response line.

Note that the special values do not include a trailing colon.

lpszValue
Pointer to a null-terminated string containing the new string for the header, or to \0 (if the header is to be deleted).

Return Values

This callback function returns TRUE if the call is successful; otherwise, it returns FALSE.

Remarks

A pointer to this function is included as a member of the following structures:

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wpxhttpfilt.h.

See Also

Callback Functions