/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
/* The Version Information storage passed to a module on startup *viatheGetExtensionVersion()entrypoint.
*/ typedefstruct HSE_VERSION_INFO {
apr_uint32_t dwExtensionVersion; char lpszExtensionDesc[256];
} HSE_VERSION_INFO;
/* The startup entry point that must be exported by every ISAPI handler
*/ int APR_THREAD_FUNC GetExtensionVersion(HSE_VERSION_INFO *ver_info); typedefint (APR_THREAD_FUNC *PFN_GETEXTENSIONVERSION)(HSE_VERSION_INFO *ver_info);
/* Our internal 'HCONN' representation, always opaque to the user.
*/ typedefstruct isapi_cid isapi_cid; typedefstruct isapi_cid *HCONN;
/* Status/Headers structure to pass to HSE_SEND_HEADER_EX, *anMSextensiontoServerSupportFunction
*/ typedefstruct HSE_SEND_HEADER_EX_INFO { constchar * pszStatus; /* HTTP status text, such as "200 OK" */ constchar * pszHeader; /* HTTP header lines text, such as *"Content-type:text/plain\r\n" *"Content-Language:en\r\n" *Notethat(inspiteofcchFoolengthsbelow) *NULLcharacterswillinterfereinheaders.
*/
apr_uint32_t cchStatus; /* length of pszStatus text */
apr_uint32_t cchHeader; /* length of pszHeader text */ int fKeepConn; /* Ignored: used to set keep-alive status, *butApachefollowstheclient'snegotiated *HTTPcontracttodecide.
*/
} HSE_SEND_HEADER_EX_INFO;
/* Our only 'supported' MS extended flag bit for TransmitFile, *HSE_IO_SEND_HEADERSindicatesthatStatus+Headersarepresent *inthepszStatusCodememberoftheHSE_TF_INFOstructure.
*/ #define HSE_IO_SEND_HEADERS 8
/* The remaining flags are MS extended flag bits that bear little *relationtoApache;therulesthattheApacheserverobeysfollow *itsowndesignandHTTPprotocolfilterrules. * *Wedonotsupportasync,however,wefakeit.IfHSE_IO_SYNCis *notpassed,andacompletioncontextwasdefined,wewillinvokethe *completionfunctionimmediatelyfollowingthetransfer,andthen *returntothecaller.IfHSE_IO_SYNCispassed,thereisnocall *necessarytothecompletioncontext.
*/ #define HSE_IO_SYNC 1 #define HSE_IO_ASYNC 2 #define HSE_IO_DISCONNECT_AFTER_SEND 4 #define HSE_IO_NODELAY 4096
/* The Completion function prototype. This callback may be fixed with *theHSE_REQ_IO_COMPLETIONServerSupportFunctioncall,oroverridden *fortheHSE_REQ_TRANSMIT_FILEcall.
*/ typedefvoid (APR_THREAD_FUNC *PFN_HSE_IO_COMPLETION)
(EXTENSION_CONTROL_BLOCK *ecb, void *ctxt,
apr_uint32_t cbIO,
apr_uint32_t dwError);
/* TransmitFile structure to pass to HSE_REQ_TRANSMIT_FILE, an MS extension
*/ typedefstruct HSE_TF_INFO {
PFN_HSE_IO_COMPLETION pfnHseIO; /* Overrides the default setting of *HSE_REQ_IO_COMPLETIONifnotNULL
*/ void *pContext;
apr_os_file_t hFile; /* HANDLE/fd to transmit */ constchar *pszStatusCode; /* Ignored if HSE_IO_SEND_HEADERS is *notset.IncludesHTTPstatustext *plusheadertextlines,suchas *"200OK\r\n" *"Content-type:text/plain\r\n"
*/
apr_uint32_t BytesToWrite; /* 0 is write-all */
apr_uint32_t Offset; /* File Offset */ void *pHead; /* Prefix with *pHead body text */
apr_uint32_t HeadLength; /* Length of *pHead body text */ void *pTail; /* Prefix with *pTail body text */
apr_uint32_t TailLength; /* Length of *pTail body text */
apr_uint32_t dwFlags; /* bit flags described above */
} HSE_TF_INFO;
/* The request entry point that must be exported by every ISAPI handler
*/
apr_uint32_t APR_THREAD_FUNC HttpExtensionProc(EXTENSION_CONTROL_BLOCK *ecb); typedef apr_uint32_t (APR_THREAD_FUNC
*PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK *ecb);
/* Allowable return values from HttpExtensionProc (apparently 0 is also *acceptedbyMSIIS,andwewillrespectitasSuccess.) *IftheHttpExtensionProcreturnsHSE_STATUS_PENDING,wewillcreate *awaitmutexandlockonit,untilHSE_REQ_DONE_WITH_SESSIONiscalled.
*/ #define HSE_STATUS_SUCCESS 1 #define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2/* 1 vs 2 Ignored, we choose */ #define HSE_STATUS_PENDING 3/* Emulated (thread lock) */ #define HSE_STATUS_ERROR 4
/* The shutdown entry point optionally exported by an ISAPI handler, passed *HSE_TERM_MUST_UNLOADorHSE_TERM_ADVISORY_UNLOAD.Themodulemayreturn *ifpassedHSE_TERM_ADVISORY_UNLOAD,andthemodulewillremainloaded. *Ifthemodulereturns1toHSE_TERM_ADVISORY_UNLOADitisimmediately *unloaded.IfthemoduleispassedHSE_TERM_MUST_UNLOAD,itsreturnvalue *isignored.
*/ int APR_THREAD_FUNC TerminateExtension(apr_uint32_t flags); typedefint (APR_THREAD_FUNC *PFN_TERMINATEEXTENSION)(apr_uint32_t flags);
/* Module may return 0 if passed HSE_TERM_ADVISORY_UNLOAD, and the module *willremainloaded,or1ifitconsentstobeingunloaded.Ifthemodule *ispassedHSE_TERM_MUST_UNLOAD,itsreturnvalueisignored.
*/ #define HSE_TERM_MUST_UNLOAD 1 #define HSE_TERM_ADVISORY_UNLOAD 2
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.