1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>mod_isapi - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_isapi</h1>
24 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English"> en </a> |
25 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
27 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>ISAPI Extensions within Apache for Windows</td></tr>
28 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
29 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>isapi_module</td></tr>
30 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_isapi.c</td></tr>
31 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only</td></tr></table>
34 <p>This module implements the Internet Server extension API. It
35 allows Internet Server extensions (<em>e.g.</em> ISAPI .dll
36 modules) to be served by Apache for Windows, subject to the
37 noted restrictions.</p>
39 <p>ISAPI extension modules (.dll files) are written by third
40 parties. The Apache Group does not author these modules, so we
41 provide no support for them. Please contact the ISAPI's author
42 directly if you are experiencing problems running their ISAPI
43 extension. <strong>Please <em>do not</em> post such problems to
44 Apache's lists or bug reporting pages.</strong></p>
46 <div id="quickview"><h3 class="directives">Directives</h3>
48 <li><img alt="" src="../images/down.gif" /> <a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#isapicachefile">ISAPICacheFile</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#isapifakeasync">ISAPIFakeAsync</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#isapilognotsupported">ISAPILogNotSupported</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#usage">Usage</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#notes">Additional Notes</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#journal">Programmer's Journal</a></li>
61 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
63 <h2><a name="usage" id="usage">Usage</a></h2>
65 <p>In the server configuration file, use
66 the <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> directive to
67 associate ISAPI files with the <code>isapi-handler</code> handler, and map
68 it to them with their file extensions. To enable any .dll file to be
69 processed as an ISAPI extension, edit the httpd.conf file and add the
71 <div class="example"><p><code>
72 AddHandler isapi-handler .dll
75 <div class="note">In versions of the Apache server prior to 2.0.37, use
76 <code>isapi-isa</code> instead of <code>isapi-handler</code>. The new
77 handler name is not available prior to version 2.0.37. For compatibility,
78 configurations may continue using <code>isapi-isa</code> through all
79 versions of Apache prior to 2.3.0.</div>
81 <p>There is no capability within the Apache server to leave a
82 requested module loaded. However, you may preload and keep a
83 specific module loaded by using the following syntax in your
85 <div class="example"><p><code>
86 ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
89 <p>Whether or not you have preloaded an ISAPI extension, all
90 ISAPI extensions are governed by the same permissions and
91 restrictions as CGI scripts. That is, <code class="directive"><a href="../mod/core.html#options">Options</a></code> <code>ExecCGI</code> must be set for the
92 directory that contains the ISAPI .dll file.</p>
94 <p>Review the <a href="#notes">Additional Notes</a> and the <a href="#journal">Programmer's Journal</a> for additional details
95 and clarification of the specific ISAPI support offered by
96 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>.</p>
97 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
99 <h2><a name="notes" id="notes">Additional Notes</a></h2>
101 <p>Apache's ISAPI implementation conforms to all of the ISAPI
102 2.0 specification, except for some "Microsoft-specific"
103 extensions dealing with asynchronous I/O. Apache's I/O model
104 does not allow asynchronous reading and writing in a manner
105 that the ISAPI could access. If an ISA tries to access
106 unsupported features, including async I/O, a message is placed
107 in the error log to help with debugging. Since these messages
108 can become a flood, the directive <code>ISAPILogNotSupported
109 Off</code> exists to quiet this noise.</p>
111 <p>Some servers, like Microsoft IIS, load the ISAPI extension
112 into the server and keep it loaded until memory usage is too
113 high, or unless configuration options are specified. Apache
114 currently loads and unloads the ISAPI extension each time it is
115 requested, unless the <code class="directive"><a href="#isapicachefile">ISAPICacheFile</a></code> directive is specified.
116 This is inefficient, but Apache's memory model makes this the
117 most effective method. Many ISAPI modules are subtly
118 incompatible with the Apache server, and unloading these
119 modules helps to ensure the stability of the server.</p>
121 <p>Also, remember that while Apache supports ISAPI Extensions,
122 it <strong>does not support ISAPI Filters</strong>. Support for
123 filters may be added at a later date, but no support is planned
125 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
126 <div class="section">
127 <h2><a name="journal" id="journal">Programmer's Journal</a></h2>
129 <p>If you are programming Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>
130 modules, you must limit your calls to <code>ServerSupportFunction</code>
131 to the following directives:</p>
134 <dt><code>HSE_REQ_SEND_URL_REDIRECT_RESP</code></dt>
135 <dd>Redirect the user to another location.<br />
136 This must be a fully qualified URL (<em>e.g.</em>
137 <code>http://server/location</code>).</dd>
139 <dt><code>HSE_REQ_SEND_URL</code></dt>
140 <dd>Redirect the user to another location.<br />
141 This cannot be a fully qualified URL, you are not allowed to
142 pass the protocol or a server name (<em>e.g.</em> simply
143 <code>/location</code>).<br />
144 This redirection is handled by the server, not the
146 <div class="warning"><h3>Warning</h3>
147 <p>In their recent documentation, Microsoft appears to have
148 abandoned the distinction between the two
149 <code>HSE_REQ_SEND_URL</code> functions. Apache continues to treat
150 them as two distinct functions with different requirements
154 <dt><code>HSE_REQ_SEND_RESPONSE_HEADER</code></dt>
155 <dd>Apache accepts a response body following the header if it
156 follows the blank line (two consecutive newlines) in the
157 headers string argument. This body cannot contain NULLs,
158 since the headers argument is NULL terminated.</dd>
160 <dt><code>HSE_REQ_DONE_WITH_SESSION</code></dt>
161 <dd>Apache considers this a no-op, since the session will be
162 finished when the ISAPI returns from processing.</dd>
164 <dt><code>HSE_REQ_MAP_URL_TO_PATH</code></dt>
165 <dd>Apache will translate a virtual name to a physical
168 <dt><code>HSE_APPEND_LOG_PARAMETER</code></dt>
170 This logged message may be captured in any of the following
174 <li>in the <code>\"%{isapi-parameter}n\"</code> component in a
175 <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code>
178 <li>in the <code>%q</code> log component with the
179 <code class="directive"><a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></code>
180 <code>On</code> directive</li>
182 <li>in the error log with the <code class="directive"><a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></code> <code>On</code> directive</li>
185 <p>The first option, the <code>%{isapi-parameter}n</code> component,
186 is always available and preferred.</p>
189 <dt><code>HSE_REQ_IS_KEEP_CONN</code></dt>
190 <dd>Will return the negotiated Keep-Alive status.</dd>
192 <dt><code>HSE_REQ_SEND_RESPONSE_HEADER_EX</code></dt>
193 <dd>Will behave as documented, although the <code>fKeepConn</code>
194 flag is ignored.</dd>
196 <dt><code>HSE_REQ_IS_CONNECTED</code></dt>
197 <dd>Will report false if the request has been aborted.</dd>
200 <p>Apache returns <code>FALSE</code> to any unsupported call to
201 <code>ServerSupportFunction</code>, and sets the
202 <code>GetLastError</code> value to
203 <code>ERROR_INVALID_PARAMETER</code>.</p>
205 <p><code>ReadClient</code> retrieves the request body exceeding the
206 initial buffer (defined by <code class="directive"><a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></code>). Based on the
207 <code class="directive">ISAPIReadAheadBuffer</code> setting (number of bytes
208 to buffer prior to calling the ISAPI handler) shorter requests are sent
209 complete to the extension when it is invoked. If the request is
210 longer, the ISAPI extension must use <code>ReadClient</code> to
211 retrieve the remaining request body.</p>
213 <p><code>WriteClient</code> is supported, but only with the
214 <code>HSE_IO_SYNC</code> flag or no option flag (value of
215 <code>0</code>). Any other <code>WriteClient</code> request
216 will be rejected with a return value of <code>FALSE</code>, and a
217 <code>GetLastError</code> value of
218 <code>ERROR_INVALID_PARAMETER</code>.</p>
220 <p><code>GetServerVariable</code> is supported, although extended server
221 variables do not exist (as defined by other servers.) All the
222 usual Apache CGI environment variables are available from
223 <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
224 and <code>ALL_RAW</code> values.</p>
226 <p>Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> supports additional
227 features introduced in later versions of the ISAPI specification,
228 as well as limited emulation of async I/O and the
229 <code>TransmitFile</code> semantics. Apache also supports preloading
230 ISAPI .dlls for performance, neither of which were not available under
231 Apache 1.3 <code>mod_isapi</code>.</p>
233 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
234 <div class="directive-section"><h2><a name="ISAPIAppendLogToErrors" id="ISAPIAppendLogToErrors">ISAPIAppendLogToErrors</a> <a name="isapiappendlogtoerrors" id="isapiappendlogtoerrors">Directive</a></h2>
235 <table class="directive">
236 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
237 ISAPI extensions to the error log</td></tr>
238 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToErrors on|off</code></td></tr>
239 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToErrors off</code></td></tr>
240 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
241 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
242 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
243 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
245 <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
246 extensions to the server error log.</p>
249 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
250 <div class="directive-section"><h2><a name="ISAPIAppendLogToQuery" id="ISAPIAppendLogToQuery">ISAPIAppendLogToQuery</a> <a name="isapiappendlogtoquery" id="isapiappendlogtoquery">Directive</a></h2>
251 <table class="directive">
252 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
253 ISAPI extensions to the query field</td></tr>
254 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToQuery on|off</code></td></tr>
255 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToQuery on</code></td></tr>
256 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
257 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
258 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
259 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
261 <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
262 extensions to the query field (appended to the <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code> <code>%q</code>
266 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
267 <div class="directive-section"><h2><a name="ISAPICacheFile" id="ISAPICacheFile">ISAPICacheFile</a> <a name="isapicachefile" id="isapicachefile">Directive</a></h2>
268 <table class="directive">
269 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>ISAPI .dll files to be loaded at startup</td></tr>
270 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPICacheFile <var>file-path</var> [<var>file-path</var>]
272 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
273 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
274 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
276 <p>Specifies a space-separated list of file names to be loaded
277 when the Apache server is launched, and remain loaded until the
278 server is shut down. This directive may be repeated for every
279 ISAPI .dll file desired. The full path name of each file should
280 be specified. If the path name is not absolute, it will be treated
281 relative to <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>.</p>
284 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
285 <div class="directive-section"><h2><a name="ISAPIFakeAsync" id="ISAPIFakeAsync">ISAPIFakeAsync</a> <a name="isapifakeasync" id="isapifakeasync">Directive</a></h2>
286 <table class="directive">
287 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fake asynchronous support for ISAPI callbacks</td></tr>
288 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIFakeAsync on|off</code></td></tr>
289 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIFakeAsync off</code></td></tr>
290 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
291 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
292 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
293 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
295 <p>While set to on, asynchronous support for ISAPI callbacks is
299 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
300 <div class="directive-section"><h2><a name="ISAPILogNotSupported" id="ISAPILogNotSupported">ISAPILogNotSupported</a> <a name="isapilognotsupported" id="isapilognotsupported">Directive</a></h2>
301 <table class="directive">
302 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Log unsupported feature requests from ISAPI
304 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPILogNotSupported on|off</code></td></tr>
305 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPILogNotSupported off</code></td></tr>
306 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
307 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
308 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
309 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
311 <p>Logs all requests for unsupported features from ISAPI
312 extensions in the server error log. This may help administrators
313 to track down problems. Once set to on and all desired ISAPI modules
314 are functioning, it should be set back to off.</p>
317 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
318 <div class="directive-section"><h2><a name="ISAPIReadAheadBuffer" id="ISAPIReadAheadBuffer">ISAPIReadAheadBuffer</a> <a name="isapireadaheadbuffer" id="isapireadaheadbuffer">Directive</a></h2>
319 <table class="directive">
320 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size of the Read Ahead Buffer sent to ISAPI
322 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIReadAheadBuffer <var>size</var></code></td></tr>
323 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIReadAheadBuffer 49152</code></td></tr>
324 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
325 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
326 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
327 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
329 <p>Defines the maximum size of the Read Ahead Buffer sent to
330 ISAPI extensions when they are initially invoked. All remaining
331 data must be retrieved using the <code>ReadClient</code> callback; some
332 ISAPI extensions may not support the <code>ReadClient</code> function.
333 Refer questions to the ISAPI extension's author.</p>
337 <div class="bottomlang">
338 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English"> en </a> |
339 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
340 </div><div id="footer">
341 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
342 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>