NAME

AddResponseHeader - ISAPI Add headers to an HTTP response.


SYNOPSIS

 #include "httpfilt.h"
 HTTP_FILTER_CONTEXT *pfc;
 char headers[] = "Header: value\r\nContent-Type: text/plain\r\n";
 DWORD Reserved = 0;
 BOOL OK = pfc->AddResponseHeader( pfc, (LPSTR) headers, Reserved );


DESCRIPTION

The AddResponseHeader function is supplied as a field of the HTTP_FILTER_CONTEXT provided to HttpFilterProc; it provides a filter with the means to add headers to the response sent to a client. This only works prior to the SF_NOTIFY_SEND_RESPONSE notification; when processing SF_NOTIFY_SEND_RESPONSE, HttpFilterProc is equipped with an HTTP_FILTER_PREPROC_HEADERS structure which provides an AddHeader callback (see HTTP_FILTER_PREPROC_HEADERS(5) for details) with which to send headers, which should be used in preference to AddResponseHeader. Subsequent notifications cannot influence the headers sent to the client.

pfc

The first parameter should point to the HTTP_FILTER_CONTEXT from which AddResponseHeader was read.

headers

The second parameter, headers, should be a zero-terminated string containing the headers and their values. Each header line should be terminated with the combination ``\r\n'' (a.k.a. CR-LF).

Reserved

The last parameter, Reserved, is ignored in ISAPI/4.0.


RETURN

Return TRUE on success; FALSE otherwise.


SEE ALSO

isapi(7), HttpFilterProc(3), HTTP_FILTER_CONTEXT(5).


FILES

$ZEUSHOME/web/include/httpfilt.h $ZEUSHOME/web/include/wintypes.h $ZEUSHOME/webadmin/docroot/docs/modules/isapi/*.html


COPYRIGHT

Copyright (C) 2000-2001 Zeus Technology Limited. All rights reserved.