Description: | ISAPI Extensions within Apache for Windows |
---|---|
Status: | Base |
Module Identifier: | isapi_module |
Source File: | mod_isapi.c |
Compatibility: | Win32 only |
This module implements the Internet Server extension API. It allows Internet Server extensions (e.g. ISAPI .dll modules) to be served by Apache for Windows, subject to the noted restrictions.
ISAPI extension modules (.dll files) are written by third parties. The Apache Group does not author these modules, so we provide no support for them. Please contact the ISAPI's author directly if you are experiencing problems running their ISAPI extension.Pleasedo not post such problems to Apache's lists or bug reporting pages.
In the server configuration file, use theAddHandler
directive to associate ISAPI files with theisapi-handler
handler, and map it to them with their file extensions. To enable any .dll file to be processed as an ISAPI extension, edit the httpd.conf file and add the following line:
AddHandler isapi-handler .dll
isapi-isa
was the proper handler name, rather thanisapi-handler
. As of 2.3 development versions of the Apache server,isapi-isa
is no longer valid. You will need to change your configuration to useisapi-handler
instead.There is no capability within the Apache server to leave a requested module loaded. However, you may preload and keep a specific module loaded by using the following syntax in your httpd.conf:
ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
Whether or not you have preloaded an ISAPI extension, all ISAPI extensions are governed by the same permissions and restrictions as CGI scripts. That is,Options
ExecCGI
must be set for the directory that contains the ISAPI .dll file.
Review theAdditional Notes and theProgrammer's Journal for additional details and clarification of the specific ISAPI support offered bymod_isapi
.
Apache's ISAPI implementation conforms to all of the ISAPI 2.0 specification, except for some "Microsoft-specific" extensions dealing with asynchronous I/O. Apache's I/O model does not allow asynchronous reading and writing in a manner that the ISAPI could access. If an ISA tries to access unsupported features, including async I/O, a message is placed in the error log to help with debugging. Since these messages can become a flood, the directiveISAPILogNotSupported Off
exists to quiet this noise.
Some servers, like Microsoft IIS, load the ISAPI extension into the server and keep it loaded until memory usage is too high, or unless configuration options are specified. Apache currently loads and unloads the ISAPI extension each time it is requested, unless theISAPICacheFile
directive is specified. This is inefficient, but Apache's memory model makes this the most effective method. Many ISAPI modules are subtly incompatible with the Apache server, and unloading these modules helps to ensure the stability of the server.
Also, remember that while Apache supports ISAPI Extensions, itdoes not support ISAPI Filters. Support for filters may be added at a later date, but no support is planned at this time.
If you are programming Apache 2.0mod_isapi
modules, you must limit your calls toServerSupportFunction
to the following directives:
HSE_REQ_SEND_URL_REDIRECT_RESP
http://server/location
).HSE_REQ_SEND_URL
/location
).In their recent documentation, Microsoft appears to have abandoned the distinction between the twoHSE_REQ_SEND_URL
functions. Apache continues to treat them as two distinct functions with different requirements and behaviors.
HSE_REQ_SEND_RESPONSE_HEADER
HSE_REQ_DONE_WITH_SESSION
HSE_REQ_MAP_URL_TO_PATH
HSE_APPEND_LOG_PARAMETER
\"%{isapi-parameter}n\"
component in aCustomLog
directive%q
log component with theISAPIAppendLogToQuery
On
directiveISAPIAppendLogToErrors
On
directiveThe first option, the%{isapi-parameter}n
component, is always available and preferred.
HSE_REQ_IS_KEEP_CONN
HSE_REQ_SEND_RESPONSE_HEADER_EX
fKeepConn
flag is ignored.HSE_REQ_IS_CONNECTED
Apache returnsFALSE
to any unsupported call toServerSupportFunction
, and sets theGetLastError
value toERROR_INVALID_PARAMETER
.
ReadClient
retrieves the request body exceeding the initial buffer (defined byISAPIReadAheadBuffer
). Based on theISAPIReadAheadBuffer
setting (number of bytes to buffer prior to calling the ISAPI handler) shorter requests are sent complete to the extension when it is invoked. If the request is longer, the ISAPI extension must useReadClient
to retrieve the remaining request body.
WriteClient
is supported, but only with theHSE_IO_SYNC
flag or no option flag (value of0
). Any otherWriteClient
request will be rejected with a return value ofFALSE
, and aGetLastError
value ofERROR_INVALID_PARAMETER
.
GetServerVariable
is supported, although extended server variables do not exist (as defined by other servers.) All the usual Apache CGI environment variables are available fromGetServerVariable
, as well as theALL_HTTP
andALL_RAW
values.
Since httpd 2.0,mod_isapi
supports additional features introduced in later versions of the ISAPI specification, as well as limited emulation of async I/O and theTransmitFile
semantics. Apache httpd also supports preloading ISAPI .dlls for performance.
Description: | RecordHSE_APPEND_LOG_PARAMETER requests fromISAPI extensions to the error log |
---|---|
Syntax: | ISAPIAppendLogToErrors on|off |
Default: | ISAPIAppendLogToErrors off |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Base |
Module: | mod_isapi |
RecordHSE_APPEND_LOG_PARAMETER
requests from ISAPI extensions to the server error log.
Description: | RecordHSE_APPEND_LOG_PARAMETER requests fromISAPI extensions to the query field |
---|---|
Syntax: | ISAPIAppendLogToQuery on|off |
Default: | ISAPIAppendLogToQuery on |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Base |
Module: | mod_isapi |
RecordHSE_APPEND_LOG_PARAMETER
requests from ISAPI extensions to the query field (appended to theCustomLog
%q
component).
Description: | ISAPI .dll files to be loaded at startup |
---|---|
Syntax: | ISAPICacheFilefile-path [file-path]... |
Context: | server config, virtual host |
Status: | Base |
Module: | mod_isapi |
Specifies a space-separated list of file names to be loaded when the Apache server is launched, and remain loaded until the server is shut down. This directive may be repeated for every ISAPI .dll file desired. The full path name of each file should be specified. If the path name is not absolute, it will be treated relative toServerRoot
.
Description: | Fake asynchronous support for ISAPI callbacks |
---|---|
Syntax: | ISAPIFakeAsync on|off |
Default: | ISAPIFakeAsync off |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Base |
Module: | mod_isapi |
While set to on, asynchronous support for ISAPI callbacks is simulated.
Description: | Log unsupported feature requests from ISAPIextensions |
---|---|
Syntax: | ISAPILogNotSupported on|off |
Default: | ISAPILogNotSupported off |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Base |
Module: | mod_isapi |
Logs all requests for unsupported features from ISAPI extensions in the server error log. This may help administrators to track down problems. Once set to on and all desired ISAPI modules are functioning, it should be set back to off.
Description: | Size of the Read Ahead Buffer sent to ISAPIextensions |
---|---|
Syntax: | ISAPIReadAheadBuffersize |
Default: | ISAPIReadAheadBuffer 49152 |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Base |
Module: | mod_isapi |
Defines the maximum size of the Read Ahead Buffer sent to ISAPI extensions when they are initially invoked. All remaining data must be retrieved using theReadClient
callback; some ISAPI extensions may not support theReadClient
function. Refer questions to the ISAPI extension's author.
Copyright 2025 The Apache Software Foundation.
Licensed under theApache License, Version 2.0.