NAME

HttpFilterProc - ISAPI filter processing routine.


SYNOPSIS

 #include "httpfilt.h"
 DWORD HttpFilterProc ( HTTP_FILTER_CONTEXT *pfc,
                        DWORD NotificationType,
                        VOID *pvNotification ) {
    /* do the job */
    return SF_STATUS_REQ_NEXT_NOTIFICATION;
 }


DESCRIPTION

HttpFilterProc performs a filter's processing of a stage in the web server's handling of a request. It is called, for each request handled, at every processing stage in which GetFilterVersion expressed an interest.

On Tru64 UNIX (because of complications in that OS's handling of shared libraries) HttpFilterProc must appear in the shared library which implements the filter - if the filter depends on further shared libraries, it can only use these to provide the tools needed by its interfaces; it cannot delegate, to them, provision of the ISAPI interface functions themselves.


PARAMETERS

pfc

First parameter, pfc, points to a structure describing the request being processed: see HTTP_FILTER_CONTEXT(5). In particular, this provides a toolkit of functions for use by the HttpFilterProc providing system-independent mechanisms for performing various operations.

NotificationType

Second parameter, NotificationType, indicates the stage, in the request's processing, to which the present call relates. Its value is a DWORD in which one bit is set, corresponding to one of the event designator flags (see GetFilterVersion(3), the dwFlags field of the HTTP_FILTER_VERSION structure) selected when the filter was initialized.

pvNotification

Third parameter, pvNotification, is a pointer to a data structure providing information pertinent to the present stage of processing: its type depends on NotificationType.

SF_NOTIFY_READ_RAW_DATA

see HTTP_FILTER_RAW_DATA(5). Only notified in-process.

SF_NOTIFY_PREPROC_HEADERS

see HTTP_FILTER_PREPROC_HEADERS(5).

SF_NOTIFY_URL_MAP

see HTTP_FILTER_URL_MAP(5).

SF_NOTIFY_AUTHENTICATION

see HTTP_FILTER_AUTHENT(5).

SF_NOTIFY_ACCESS_DENIED

see HTTP_FILTER_ACCESS_DENIED(5). Only notified in-process.

SF_NOTIFY_SEND_RESPONSE

see HTTP_FILTER_PREPROC_HEADERS(5) - this type is a synonym for HTTP_FILTER_SEND_RESPONSE.

SF_NOTIFY_SEND_RAW_DATA

see HTTP_FILTER_RAW_DATA(5). Only notified in-process.

SF_NOTIFY_END_OF_REQUEST

pvNotification is NULL. Only notified in-process.

SF_NOTIFY_LOG

see HTTP_FILTER_LOG(5). Only notified in-process.

SF_NOTIFY_END_OF_NET_SESSION

pvNotification is NULL. Only notified in-process.


RETURN

Returns an `enum SF_STATUS_TYPE' value (but, for historical reasons, returns it as a DWORD), namely one of:

SF_STATUS_REQ_FINISHED

The filter has handled the HTTP request. The server should disconnect the TCP/IP session

SF_STATUS_REQ_FINISHED_KEEP_CONN

The filter has handled the HTTP request. The server may disconnect the TCP/IP session but, if keep-alive has been negotiated, should keep it open.

SF_STATUS_REQ_NEXT_NOTIFICATION

The next filter in the notification chain should be called. This status code will usually be the default return from an HttpFilterProc.

SF_STATUS_REQ_HANDLED_NOTIFICATION

This filter has handled the present notification: no further filters should be called for the same NotificationType on this request.

IMPORTANT NOTE: Returning this value prevents any other processes with lower priority which are running (e.g. core webserver modules) from handling notifications of this type. This return code should only be used if you are sure this is the way you want the notifications to be handled. For most applications you should return SF_STATUS_REQ_NEXT_NOTIFICATION instead of this.

SF_STATUS_REQ_ERROR

An error has occurred. The server should consult the ANSI C global errno variable and communicate the error to the client.

SF_STATUS_REQ_READ_NEXT

The filter is an opaque stream filter and is negotiating the session parameters (only valid for `raw read' notification, SF_NOTIFY_READ_RAW_DATA).


SEE ALSO

isapi(7), HttpExtensionProc(3), GetFilterVersion(3), TerminateFilter(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.