mod_isapi.xml revision 33d6d297ef4fe7ea963e9641c8482d677f557df0
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<!-- $LastChangedRevision$ -->
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Licensed to the Apache Software Foundation (ASF) under one or more
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive contributor license agreements. See the NOTICE file distributed with
530eba85dbd41b8a0fa5255d3648d1440199a661slive this work for additional information regarding copyright ownership.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The ASF licenses this file to You under the Apache License, Version 2.0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (the "License"); you may not use this file except in compliance with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the License. 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it to them with their file extensions. To enable any .dll file to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processed as an ISAPI extension, edit the httpd.conf file and add the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive following line:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddHandler isapi-handler .dll
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>In older versions of the Apache server,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is no capability within the Apache server to leave a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive requested module loaded. However, you may preload and keep a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specific module loaded by using the following syntax in your
130d299c4b2b15be45532a176604c71fdc7bea5bnd </highlight>
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"
130d299c4b2b15be45532a176604c71fdc7bea5bnd >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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="#journal">Programmer's Journal</a> for additional details
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and clarification of the specific ISAPI support offered by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
003f0c9fda6664daf5092a0e42f65ede20098153slive in the error log to help with debugging. Since these messages
003f0c9fda6664daf5092a0e42f65ede20098153slive can become a flood, the directive <code>ISAPILogNotSupported
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Some servers, like Microsoft IIS, load the ISAPI extension
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <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>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>Apache accepts a response body following the header if it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive follows the blank line (two consecutive newlines) in the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
58699879a562774640b95e9eedfd891f336e38c2nd <li>in the error log with the <directive module="mod_isapi"
58699879a562774640b95e9eedfd891f336e38c2nd >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>
58699879a562774640b95e9eedfd891f336e38c2nd <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
58699879a562774640b95e9eedfd891f336e38c2nd <directive>ISAPIReadAheadBuffer</directive> setting (number of bytes
58699879a562774640b95e9eedfd891f336e38c2nd to buffer prior to calling the ISAPI handler) shorter requests are sent
58699879a562774640b95e9eedfd891f336e38c2nd complete to the extension when it is invoked. If the request is
58699879a562774640b95e9eedfd891f336e38c2nd longer, the ISAPI extension must use <code>ReadClient</code> to
58699879a562774640b95e9eedfd891f336e38c2nd retrieve the remaining request body.</p>
58699879a562774640b95e9eedfd891f336e38c2nd <p><code>WriteClient</code> is supported, but only with the
58699879a562774640b95e9eedfd891f336e38c2nd <code>HSE_IO_SYNC</code> flag or no option flag (value of
58699879a562774640b95e9eedfd891f336e38c2nd <code>0</code>). Any other <code>WriteClient</code> request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be rejected with a return value of <code>FALSE</code>, and a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><code>GetServerVariable</code> is supported, although extended server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd variables do not exist (as defined by other servers.) All the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive usual Apache CGI environment variables are available from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Since httpd 2.0, <module>mod_isapi</module> supports additional
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive features introduced in later versions of the ISAPI specification,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as well as limited emulation of async I/O and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TransmitFile</code> semantics. Apache httpd also supports preloading
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ISAPI .dlls for performance.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Specifies a space-separated list of file names to be loaded
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive when the Apache server is launched, and remain loaded until the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server is shut down. This directive may be repeated for every
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ISAPI .dll file desired. The full path name of each file should
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be specified. If the path name is not absolute, it will be treated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to <directive module="core">ServerRoot</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Size of the Read Ahead Buffer sent to ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveextensions</description>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<syntax>ISAPIReadAheadBuffer <var>size</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Log unsupported feature requests from ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveextensions</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<contextlist><context>server config</context><context>virtual host</context>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extensions to the query field (appended to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_log_config">CustomLog</directive> <code>%q</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive component).</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd</modulesynopsis>