Share via


AddResponseHeaders (Compact 2013)

3/26/2014

This callback function is provided by the Web Server. ISAPI filters call this function to add a header to the HTTP response. The AddResponseHeaders name for this function is a placeholder for the function name defined by the header.

Syntax

BOOL WINAPI* AddResponseHeaders(
  PHTTP_FILTER_CONTEXT pfc,
  LPSTR lpszHeaders,
  LPSTR dwReserved 
);

Parameters

  • pfc
    [in] Pointer to an HTTP_FILTER_CONTEXT structure that is associated with the current, active HTTP transaction.
  • lpszHeaders
    [in] Pointer to a string that contains the headers to add. The string should be in the following format:

    Header: value\r\n

  • dwReserved
    [in] Reserved; set to 0 (zero).

Return Value

Returns TRUE if the function succeeds, and FALSE otherwise. To determine the cause of a failure, the filter should call GetLastError.

Remarks

This callback function can be used to add headers for client before the server processes the request, but not during or after HTTP_FILTER_SEND_RESPONSE notification. If your filter needs to add a header when this notification occurs, it can do so by using the AddHeader member of the HTTP_FILTER_SEND_RESPONSE structure.

Requirements

Header

httpfilt.h

Library

Developer Implemented

See Also

Reference

Web Server Functions
HTTP_FILTER_SEND_RESPONSE