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" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
19 <p class="apache">Apache HTTP Server Version 2.5</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
23 <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.5</a> > <a href="./">Modules</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache Module mod_isapi</h1>
27 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English"> en </a> |
28 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
30 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>ISAPI Extensions within Apache for Windows</td></tr>
31 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
32 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>isapi_module</td></tr>
33 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_isapi.c</td></tr>
34 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only</td></tr></table>
37 <p>This module implements the Internet Server extension API. It
38 allows Internet Server extensions (<em>e.g.</em> ISAPI .dll
39 modules) to be served by Apache for Windows, subject to the
40 noted restrictions.</p>
42 <p>ISAPI extension modules (.dll files) are written by third
43 parties. The Apache Group does not author these modules, so we
44 provide no support for them. Please contact the ISAPI's author
45 directly if you are experiencing problems running their ISAPI
46 extension. <strong>Please <em>do not</em> post such problems to
47 Apache's lists or bug reporting pages.</strong></p>
49 <div id="quickview"><h3 class="directives">Directives</h3>
51 <li><img alt="" src="../images/down.gif" /> <a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#isapicachefile">ISAPICacheFile</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#isapifakeasync">ISAPIFakeAsync</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#isapilognotsupported">ISAPILogNotSupported</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#usage">Usage</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#notes">Additional Notes</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#journal">Programmer's Journal</a></li>
63 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
64 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
66 <h2><a name="usage" id="usage">Usage</a></h2>
68 <p>In the server configuration file, use
69 the <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> directive to
70 associate ISAPI files with the <code>isapi-handler</code> handler, and map
71 it to them with their file extensions. To enable any .dll file to be
72 processed as an ISAPI extension, edit the httpd.conf file and add the
74 <pre class="prettyprint lang-config">
75 AddHandler isapi-handler .dll
79 <div class="note">In older versions of the Apache server,
80 <code>isapi-isa</code> was the proper handler name, rather than
81 <code>isapi-handler</code>. As of 2.3 development versions of the Apache
82 server, <code>isapi-isa</code> is no longer valid. You will need to
83 change your configuration to use <code>isapi-handler</code>
86 <p>There is no capability within the Apache server to leave a
87 requested module loaded. However, you may preload and keep a
88 specific module loaded by using the following syntax in your
90 <pre class="prettyprint lang-config">
91 ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
95 <p>Whether or not you have preloaded an ISAPI extension, all
96 ISAPI extensions are governed by the same permissions and
97 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
98 directory that contains the ISAPI .dll file.</p>
100 <p>Review the <a href="#notes">Additional Notes</a> and the <a href="#journal">Programmer's Journal</a> for additional details
101 and clarification of the specific ISAPI support offered by
102 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>.</p>
103 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
104 <div class="section">
105 <h2><a name="notes" id="notes">Additional Notes</a></h2>
107 <p>Apache's ISAPI implementation conforms to all of the ISAPI
108 2.0 specification, except for some "Microsoft-specific"
109 extensions dealing with asynchronous I/O. Apache's I/O model
110 does not allow asynchronous reading and writing in a manner
111 that the ISAPI could access. If an ISA tries to access
112 unsupported features, including async I/O, a message is placed
113 in the error log to help with debugging. Since these messages
114 can become a flood, the directive <code>ISAPILogNotSupported
115 Off</code> exists to quiet this noise.</p>
117 <p>Some servers, like Microsoft IIS, load the ISAPI extension
118 into the server and keep it loaded until memory usage is too
119 high, or unless configuration options are specified. Apache
120 currently loads and unloads the ISAPI extension each time it is
121 requested, unless the <code class="directive"><a href="#isapicachefile">ISAPICacheFile</a></code> directive is specified.
122 This is inefficient, but Apache's memory model makes this the
123 most effective method. Many ISAPI modules are subtly
124 incompatible with the Apache server, and unloading these
125 modules helps to ensure the stability of the server.</p>
127 <p>Also, remember that while Apache supports ISAPI Extensions,
128 it <strong>does not support ISAPI Filters</strong>. Support for
129 filters may be added at a later date, but no support is planned
131 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
132 <div class="section">
133 <h2><a name="journal" id="journal">Programmer's Journal</a></h2>
135 <p>If you are programming Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>
136 modules, you must limit your calls to <code>ServerSupportFunction</code>
137 to the following directives:</p>
140 <dt><code>HSE_REQ_SEND_URL_REDIRECT_RESP</code></dt>
141 <dd>Redirect the user to another location.<br />
142 This must be a fully qualified URL (<em>e.g.</em>
143 <code>http://server/location</code>).</dd>
145 <dt><code>HSE_REQ_SEND_URL</code></dt>
146 <dd>Redirect the user to another location.<br />
147 This cannot be a fully qualified URL, you are not allowed to
148 pass the protocol or a server name (<em>e.g.</em> simply
149 <code>/location</code>).<br />
150 This redirection is handled by the server, not the
152 <div class="warning"><h3>Warning</h3>
153 <p>In their recent documentation, Microsoft appears to have
154 abandoned the distinction between the two
155 <code>HSE_REQ_SEND_URL</code> functions. Apache continues to treat
156 them as two distinct functions with different requirements
160 <dt><code>HSE_REQ_SEND_RESPONSE_HEADER</code></dt>
161 <dd>Apache accepts a response body following the header if it
162 follows the blank line (two consecutive newlines) in the
163 headers string argument. This body cannot contain NULLs,
164 since the headers argument is NULL terminated.</dd>
166 <dt><code>HSE_REQ_DONE_WITH_SESSION</code></dt>
167 <dd>Apache considers this a no-op, since the session will be
168 finished when the ISAPI returns from processing.</dd>
170 <dt><code>HSE_REQ_MAP_URL_TO_PATH</code></dt>
171 <dd>Apache will translate a virtual name to a physical
174 <dt><code>HSE_APPEND_LOG_PARAMETER</code></dt>
176 This logged message may be captured in any of the following
180 <li>in the <code>\"%{isapi-parameter}n\"</code> component in a
181 <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code>
184 <li>in the <code>%q</code> log component with the
185 <code class="directive"><a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></code>
186 <code>On</code> directive</li>
188 <li>in the error log with the <code class="directive"><a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></code> <code>On</code> directive</li>
191 <p>The first option, the <code>%{isapi-parameter}n</code> component,
192 is always available and preferred.</p>
195 <dt><code>HSE_REQ_IS_KEEP_CONN</code></dt>
196 <dd>Will return the negotiated Keep-Alive status.</dd>
198 <dt><code>HSE_REQ_SEND_RESPONSE_HEADER_EX</code></dt>
199 <dd>Will behave as documented, although the <code>fKeepConn</code>
200 flag is ignored.</dd>
202 <dt><code>HSE_REQ_IS_CONNECTED</code></dt>
203 <dd>Will report false if the request has been aborted.</dd>
206 <p>Apache returns <code>FALSE</code> to any unsupported call to
207 <code>ServerSupportFunction</code>, and sets the
208 <code>GetLastError</code> value to
209 <code>ERROR_INVALID_PARAMETER</code>.</p>
211 <p><code>ReadClient</code> retrieves the request body exceeding the
212 initial buffer (defined by <code class="directive"><a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></code>). Based on the
213 <code class="directive">ISAPIReadAheadBuffer</code> setting (number of bytes
214 to buffer prior to calling the ISAPI handler) shorter requests are sent
215 complete to the extension when it is invoked. If the request is
216 longer, the ISAPI extension must use <code>ReadClient</code> to
217 retrieve the remaining request body.</p>
219 <p><code>WriteClient</code> is supported, but only with the
220 <code>HSE_IO_SYNC</code> flag or no option flag (value of
221 <code>0</code>). Any other <code>WriteClient</code> request
222 will be rejected with a return value of <code>FALSE</code>, and a
223 <code>GetLastError</code> value of
224 <code>ERROR_INVALID_PARAMETER</code>.</p>
226 <p><code>GetServerVariable</code> is supported, although extended server
227 variables do not exist (as defined by other servers.) All the
228 usual Apache CGI environment variables are available from
229 <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
230 and <code>ALL_RAW</code> values.</p>
232 <p>Apache httpd 2.0+ <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> supports additional
233 features introduced in later versions of the ISAPI specification,
234 as well as limited emulation of async I/O and the
235 <code>TransmitFile</code> semantics. Apache httpd also supports preloading
236 ISAPI .dlls for performance.</p>
238 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
239 <div class="directive-section"><h2><a name="ISAPIAppendLogToErrors" id="ISAPIAppendLogToErrors">ISAPIAppendLogToErrors</a> <a name="isapiappendlogtoerrors" id="isapiappendlogtoerrors">Directive</a></h2>
240 <table class="directive">
241 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
242 ISAPI extensions to the error log</td></tr>
243 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToErrors on|off</code></td></tr>
244 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToErrors off</code></td></tr>
245 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
246 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
247 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
248 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
250 <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
251 extensions to the server error log.</p>
254 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
255 <div class="directive-section"><h2><a name="ISAPIAppendLogToQuery" id="ISAPIAppendLogToQuery">ISAPIAppendLogToQuery</a> <a name="isapiappendlogtoquery" id="isapiappendlogtoquery">Directive</a></h2>
256 <table class="directive">
257 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from
258 ISAPI extensions to the query field</td></tr>
259 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToQuery on|off</code></td></tr>
260 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToQuery on</code></td></tr>
261 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
262 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
263 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
264 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
266 <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
267 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>
271 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
272 <div class="directive-section"><h2><a name="ISAPICacheFile" id="ISAPICacheFile">ISAPICacheFile</a> <a name="isapicachefile" id="isapicachefile">Directive</a></h2>
273 <table class="directive">
274 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>ISAPI .dll files to be loaded at startup</td></tr>
275 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPICacheFile <var>file-path</var> [<var>file-path</var>]
277 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
278 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
279 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
281 <p>Specifies a space-separated list of file names to be loaded
282 when the Apache server is launched, and remain loaded until the
283 server is shut down. This directive may be repeated for every
284 ISAPI .dll file desired. The full path name of each file should
285 be specified. If the path name is not absolute, it will be treated
286 relative to <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>.</p>
289 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
290 <div class="directive-section"><h2><a name="ISAPIFakeAsync" id="ISAPIFakeAsync">ISAPIFakeAsync</a> <a name="isapifakeasync" id="isapifakeasync">Directive</a></h2>
291 <table class="directive">
292 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fake asynchronous support for ISAPI callbacks</td></tr>
293 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIFakeAsync on|off</code></td></tr>
294 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIFakeAsync off</code></td></tr>
295 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
296 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
297 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
298 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
300 <p>While set to on, asynchronous support for ISAPI callbacks is
304 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
305 <div class="directive-section"><h2><a name="ISAPILogNotSupported" id="ISAPILogNotSupported">ISAPILogNotSupported</a> <a name="isapilognotsupported" id="isapilognotsupported">Directive</a></h2>
306 <table class="directive">
307 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Log unsupported feature requests from ISAPI
309 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPILogNotSupported on|off</code></td></tr>
310 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPILogNotSupported off</code></td></tr>
311 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
312 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
313 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
314 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
316 <p>Logs all requests for unsupported features from ISAPI
317 extensions in the server error log. This may help administrators
318 to track down problems. Once set to on and all desired ISAPI modules
319 are functioning, it should be set back to off.</p>
322 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
323 <div class="directive-section"><h2><a name="ISAPIReadAheadBuffer" id="ISAPIReadAheadBuffer">ISAPIReadAheadBuffer</a> <a name="isapireadaheadbuffer" id="isapireadaheadbuffer">Directive</a></h2>
324 <table class="directive">
325 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size of the Read Ahead Buffer sent to ISAPI
327 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIReadAheadBuffer <var>size</var></code></td></tr>
328 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIReadAheadBuffer 49152</code></td></tr>
329 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
330 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
331 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
332 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
334 <p>Defines the maximum size of the Read Ahead Buffer sent to
335 ISAPI extensions when they are initially invoked. All remaining
336 data must be retrieved using the <code>ReadClient</code> callback; some
337 ISAPI extensions may not support the <code>ReadClient</code> function.
338 Refer questions to the ISAPI extension's author.</p>
342 <div class="bottomlang">
343 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English"> en </a> |
344 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
345 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
346 <script type="text/javascript"><!--//--><![CDATA[//><!--
347 var comments_shortname = 'httpd';
348 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_isapi.html';
350 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
351 d.write('<div id="comments_thread"><\/div>');
352 var s = d.createElement('script');
353 s.type = 'text/javascript';
355 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
356 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
359 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
361 })(window, document);
362 //--><!]]></script></div><div id="footer">
363 <p class="apache">Copyright 2013 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>
364 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
365 if (typeof(prettyPrint) !== 'undefined') {