mod_isapi.xml revision bc4b55ec8f31569d606d5680d50189a355bcd7a6
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<!-- $LastChangedRevision$ -->
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Copyright 2002-2006 The Apache Software Foundation or its licensors, as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive applicable.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Licensed under the Apache License, Version 2.0 (the "License");
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you may not use this file except in compliance with the License.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive You may obtain a copy of the License at
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unless required by applicable law or agreed to in writing, software
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed under the License is distributed on an "AS IS" BASIS,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele See the License for the specific language governing permissions and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limitations under the License.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>ISAPI Extensions within Apache for Windows</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This module implements the Internet Server extension API. It
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows Internet Server extensions (<em>e.g.</em> ISAPI .dll
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modules) to be served by Apache for Windows, subject to the
fb77c505254b6e9c925e23e734463e87574f8f40kess noted restrictions.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>ISAPI extension modules (.dll files) are written by third
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parties. The Apache Group does not author these modules, so we
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provide no support for them. Please contact the ISAPI's author
fb77c505254b6e9c925e23e734463e87574f8f40kess directly if you are experiencing problems running their ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extension. <strong>Please <em>do not</em> post such problems to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the server configuration file, use
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive module="mod_mime">AddHandler</directive> directive to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive associate ISAPI files with the <code>isapi-handler</code> handler, and map
fb77c505254b6e9c925e23e734463e87574f8f40kess it to them with their file extensions. To enable any .dll file to be
fb77c505254b6e9c925e23e734463e87574f8f40kess processed as an ISAPI extension, edit the httpd.conf file and add the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive following line:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess <note>In older versions of the Apache server,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>isapi-isa</code> was the proper handler name, rather than
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>isapi-handler</code>. As of 2.3 development versions of the Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server, <code>isapi-isa</code> is no longer valid. You will need to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive change your configuration to use <code>isapi-handler</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive instead.</note>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>There is no capability within the Apache server to leave a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive requested module loaded. However, you may preload and keep a
fb77c505254b6e9c925e23e734463e87574f8f40kess specific module loaded by using the following syntax in your
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Whether or not you have preloaded an ISAPI extension, all
130d299c4b2b15be45532a176604c71fdc7bea5bnd ISAPI extensions are governed by the same permissions and
130d299c4b2b15be45532a176604c71fdc7bea5bnd restrictions as CGI scripts. That is, <directive module="core"
ef8e89e090461194ecadd31e8796a2c51e0531a2kess >Options</directive> <code>ExecCGI</code> must be set for the
130d299c4b2b15be45532a176604c71fdc7bea5bnd directory that contains the ISAPI .dll file.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Review the <a href="#notes">Additional Notes</a> and the <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="#journal">Programmer's Journal</a> for additional details
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and clarification of the specific ISAPI support offered by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Apache's ISAPI implementation conforms to all of the ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 2.0 specification, except for some "Microsoft-specific"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extensions dealing with asynchronous I/O. Apache's I/O model
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive does not allow asynchronous reading and writing in a manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the ISAPI could access. If an ISA tries to access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unsupported features, including async I/O, a message is placed
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess in the error log to help with debugging. Since these messages
003f0c9fda6664daf5092a0e42f65ede20098153slive can become a flood, the directive <code>ISAPILogNotSupported
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Some servers, like Microsoft IIS, load the ISAPI extension
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive into the server and keep it loaded until memory usage is too
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd high, or unless configuration options are specified. Apache
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd currently loads and unloads the ISAPI extension each time it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >ISAPICacheFile</directive> directive is specified.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This is inefficient, but Apache's memory model makes this the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most effective method. Many ISAPI modules are subtly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive incompatible with the Apache server, and unloading these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modules helps to ensure the stability of the server.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Also, remember that while Apache supports ISAPI Extensions,
130d299c4b2b15be45532a176604c71fdc7bea5bnd it <strong>does not support ISAPI Filters</strong>. Support for
130d299c4b2b15be45532a176604c71fdc7bea5bnd filters may be added at a later date, but no support is planned
130d299c4b2b15be45532a176604c71fdc7bea5bnd at this time.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are programming Apache 2.0 <module>mod_isapi</module>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modules, you must limit your calls to <code>ServerSupportFunction</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the following directives:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This cannot be a fully qualified URL, you are not allowed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pass the protocol or a server name (<em>e.g.</em> simply
003f0c9fda6664daf5092a0e42f65ede20098153slive This redirection is handled by the server, not the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive browser.<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In their recent documentation, Microsoft appears to have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive abandoned the distinction between the two
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>HSE_REQ_SEND_URL</code> functions. Apache continues to treat
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them as two distinct functions with different requirements
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and behaviors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Apache accepts a response body following the header if it
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd follows the blank line (two consecutive newlines) in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive headers string argument. This body cannot contain NULLs,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd since the headers argument is NULL terminated.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Apache considers this a no-op, since the session will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive finished when the ISAPI returns from processing.</dd>
58699879a562774640b95e9eedfd891f336e38c2nd <dd>Apache will translate a virtual name to a physical
58699879a562774640b95e9eedfd891f336e38c2nd name.</dd>
58699879a562774640b95e9eedfd891f336e38c2nd This logged message may be captured in any of the following
58699879a562774640b95e9eedfd891f336e38c2nd <li>in the <code>\"%{isapi-parameter}n\"</code> component in a
58699879a562774640b95e9eedfd891f336e38c2nd directive</li>
58699879a562774640b95e9eedfd891f336e38c2nd <directive module="mod_isapi">ISAPIAppendLogToQuery</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>in the error log with the <directive module="mod_isapi"
fb77c505254b6e9c925e23e734463e87574f8f40kess >ISAPIAppendLogToErrors</directive> <code>On</code> directive</li>
58699879a562774640b95e9eedfd891f336e38c2nd <p>The first option, the <code>%{isapi-parameter}n</code> component,
58699879a562774640b95e9eedfd891f336e38c2nd is always available and preferred.</p>
58699879a562774640b95e9eedfd891f336e38c2nd <dd>Will behave as documented, although the <code>fKeepConn</code>
58699879a562774640b95e9eedfd891f336e38c2nd flag is ignored.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>Will report false if the request has been aborted.</dd>
58699879a562774640b95e9eedfd891f336e38c2nd <p>Apache returns <code>FALSE</code> to any unsupported call to
58699879a562774640b95e9eedfd891f336e38c2nd <p><code>ReadClient</code> retrieves the request body exceeding the
58699879a562774640b95e9eedfd891f336e38c2nd >ISAPIReadAheadBuffer</directive>). Based on the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive>ISAPIReadAheadBuffer</directive> setting (number of bytes
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd to buffer prior to calling the ISAPI handler) shorter requests are sent
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd complete to the extension when it is invoked. If the request is
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess longer, the ISAPI extension must use <code>ReadClient</code> to
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess retrieve the remaining request body.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><code>WriteClient</code> is supported, but only with the
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <code>HSE_IO_SYNC</code> flag or no option flag (value of
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <code>0</code>). Any other <code>WriteClient</code> request
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd will be rejected with a return value of <code>FALSE</code>, and a
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <p><code>GetServerVariable</code> is supported, although extended server
ec9b02c6869b75575ada34c800672162833a2c06nd variables do not exist (as defined by other servers.) All the
58699879a562774640b95e9eedfd891f336e38c2nd usual Apache CGI environment variables are available from
58699879a562774640b95e9eedfd891f336e38c2nd <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
58699879a562774640b95e9eedfd891f336e38c2nd <p>Apache 2.0 <module>mod_isapi</module> supports additional
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd features introduced in later versions of the ISAPI specification,
58699879a562774640b95e9eedfd891f336e38c2nd as well as limited emulation of async I/O and the
58699879a562774640b95e9eedfd891f336e38c2nd <code>TransmitFile</code> semantics. Apache also supports preloading
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ISAPI .dlls for performance, neither of which were not available under
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>ISAPI .dll files to be loaded at startup</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ISAPICacheFile <var>file-path</var> [<var>file-path</var>]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Specifies a space-separated list of file names to be loaded
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive when the Apache server is launched, and remain loaded until the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server is shut down. This directive may be repeated for every
10673857794a4b3d9568ca2d983722a87ed352f1rbowen ISAPI .dll file desired. The full path name of each file should
fb77c505254b6e9c925e23e734463e87574f8f40kess be specified. If the path name is not absolute, it will be treated
fb77c505254b6e9c925e23e734463e87574f8f40kess relative to <directive module="core">ServerRoot</directive>.</p>
6af14face8dcdab3a5cd88fcdda91c268f7a3745slive</directivesynopsis>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Size of the Read Ahead Buffer sent to ISAPI
fb77c505254b6e9c925e23e734463e87574f8f40kessextensions</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Defines the maximum size of the Read Ahead Buffer sent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ISAPI extensions when they are initially invoked. All remaining
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive data must be retrieved using the <code>ReadClient</code> callback; some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ISAPI extensions may not support the <code>ReadClient</code> function.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Refer questions to the ISAPI extension's author.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<description>Log unsupported feature requests from ISAPI
9ed9eaf871c58d281af02e76125ceadb5060afa5ndextensions</description>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Logs all requests for unsupported features from ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extensions in the server error log. This may help administrators
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to track down problems. Once set to on and all desired ISAPI modules
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are functioning, it should be set back to off.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveISAPI extensions to the error log</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extensions to the server error log.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveISAPI extensions to the query field</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
9ed9eaf871c58d281af02e76125ceadb5060afa5nd extensions to the query field (appended to the <directive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd module="mod_log_config">CustomLog</directive> <code>%q</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive component).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Fake asynchronous support for ISAPI callbacks</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>While set to on, asynchronous support for ISAPI callbacks is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive simulated.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</modulesynopsis>