NAME

HttpExtensionProc - handler for requests resolved by ISAPI extension library.


SYNOPSIS

 #include "httpext.h"
 extern DWORD HttpExtensionProc ( EXTENSION_CONTROL_BLOCK *ecb )
 {
    /* service request */
    return HSE_STATUS_ERROR;
 }


DESCRIPTION

HttpExtensionProc is the normal entry-point of an extension library.

On Tru64 UNIX (because of complications in that OS's handling of shared libraries) HttpExtensionProc must appear in the shared library which implements the extension - if the extension 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

ecb

The one parameter, ecb, is a pointer to a `control block' which contains information about the request being processed and provides some functions to call, by which to perform tasks necessary to the extension handler; see EXTENSION_CONTROL_BLOCK(5).


RETURN

Return a DWORD, which shall be interpreted as an HSE_STATUS code. Reasonable return values for HttpExtensionProc are:

HSE_STATUS_SUCCESS

job done, server can disconnect and release resources allocated to this connection.

HSE_STATUS_SUCCESS_AND_KEEP_CONN

extension has responded appropriately, with correct Content-Length header, and finished with the present request; the server may keep the connection open and wait for subsequent HTTP requests from the client, if supported; or it may close the connection as for HSE_STATUS_SUCCESS.

HSE_STATUS_PENDING

the extension has made arrangements for the request to be processed asynchronously and will notify the server when the request has been processed (see HSE_REQ_DONE_WITH_SESSION under ServerSupportFunction(3)). If the extension has delegated the request to a separate thread, the latter can send the response(s) from work done after HttpExtensionProc has completed and returned HSE_STATUS_PENDING. HSE_STATUS_PENDING is only supported in out-of-process ISAPI extensions.

HSE_STATUS_ERROR

the extension encountered a problem beyond its ability to handle; the server should abandon the connection.


SEE ALSO

isapi(7), EXTENSION_CONTROL_BLOCK(5)


FILES

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


COPYRIGHT

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