Export (0) Print
Expand All

CHttpFilterContext::ServerSupportFunction 

Call this member function to extend the ISA APIs.


BOOL ServerSupportFunction(
   enum SF_REQ_TYPE sfReq,
   LPVOID lpvBuffer,
   LPDWORD lpdwSize,
   LPDWORD lpdwDataType 
);

Parameters

sfReq

Server request type. See the Remarks section for a list of of the possible values.

pvData

A pointer to a zero-terminated string. Its value is specific to the sfReq extension. When used with SF_REQ_SEND_RESPONSE_HEADER, it is an optional, null-terminated status string (for example, "401 Access Denied") or NULL for the default response of "200 OK". When used with SF_REQ_ADD_HEADERS_ON_DENIAL, it is a null-terminated string pointing to one or more header lines with terminating "\r\n".

lpdwSize

Null-terminated string. Its value is specific to the extension. When used with SF_REQ_SEND_RESPONSE_HEADER, it is a null-terminated string pointing to optional data to be appended and set with the header. If NULL, the header will be terminated with an empty line. When used with SF_REQ_ADD_HEADERS_ON_DENIAL, it is the size in bytes for the next read.

lpdwDataType

A null-terminated string pointing to optional headers or data to be appended and sent with the header. If NULL, the header will be terminated by a "\r\n" pair.

Nonzero if successful, otherwise 0.

The HTTP Server Extension value represented by sfReq, can be one of the following:

SF_REQ_SEND_RESPONSE_HEADER

Sends a complete HTTP server response header including the status, server version, message time, and MIME (Multipurpose Internet Mail Extension) version. Server extensions should append other information at the end, such as Content-type, Content-length, and so forth, followed by an extra "\r\n".

SF_REQ_ADD_HEADERS_ON_DENIAL

If the server denies the HTTP request, add the specified headers to the server error response. This allows an authentication filter to advertise its services without filtering every request. Generally the headers will be WWW-Authenticate headers with custom authentication schemes, but no restriction is placed on what headers may be specified.

SF_REQ_SET_NEXT_READ_SIZE

Only used by raw data filters that return SF_STATUS_READ_NEXT.

Community Additions

ADD
Show:
© 2014 Microsoft