]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_isapi.html.en
Rebuild transformations.
[apache] / docs / manual / mod / mod_isapi.html.en
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
7       -->
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>
13 <body>
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.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_isapi</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
26 </div>
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>
32 <h3>Summary</h3>
33
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>
38
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>
45 </div>
46 <div id="quickview"><h3 class="directives">Directives</h3>
47 <ul id="toc">
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>
54 </ul>
55 <h3>Topics</h3>
56 <ul id="topics">
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>
60 </ul></div>
61 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
62 <div class="section">
63 <h2><a name="usage" id="usage">Usage</a></h2>
64
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
70     following line:</p>
71     <div class="example"><p><code>
72         AddHandler isapi-handler .dll
73     </code></p></div>
74
75     <div class="note">In older versions of the Apache server,
76     <code>isapi-isa</code> was the proper handler name, rather than
77     <code>isapi-handler</code>. As of 2.3 development versions of the Apache
78     server, <code>isapi-isa</code> is no longer valid. You will need to
79     change your configuration to use <code>isapi-handler</code>
80     instead.</div>
81
82     <p>There is no capability within the Apache server to leave a
83     requested module loaded. However, you may preload and keep a
84     specific module loaded by using the following syntax in your
85     httpd.conf:</p>
86     <div class="example"><p><code>
87         ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
88     </code></p></div>
89
90     <p>Whether or not you have preloaded an ISAPI extension, all
91     ISAPI extensions are governed by the same permissions and
92     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
93     directory that contains the ISAPI .dll file.</p>
94
95     <p>Review the <a href="#notes">Additional Notes</a> and the <a href="#journal">Programmer's Journal</a> for additional details
96     and clarification of the specific ISAPI support offered by
97     <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>.</p>
98 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
99 <div class="section">
100 <h2><a name="notes" id="notes">Additional Notes</a></h2>
101
102     <p>Apache's ISAPI implementation conforms to all of the ISAPI
103     2.0 specification, except for some "Microsoft-specific"
104     extensions dealing with asynchronous I/O. Apache's I/O model
105     does not allow asynchronous reading and writing in a manner
106     that the ISAPI could access. If an ISA tries to access
107     unsupported features, including async I/O, a message is placed
108     in the error log to help with debugging. Since these messages
109     can become a flood, the directive <code>ISAPILogNotSupported
110     Off</code> exists to quiet this noise.</p>
111
112     <p>Some servers, like Microsoft IIS, load the ISAPI extension
113     into the server and keep it loaded until memory usage is too
114     high, or unless configuration options are specified. Apache
115     currently loads and unloads the ISAPI extension each time it is
116     requested, unless the <code class="directive"><a href="#isapicachefile">ISAPICacheFile</a></code> directive is specified.
117     This is inefficient, but Apache's memory model makes this the
118     most effective method. Many ISAPI modules are subtly
119     incompatible with the Apache server, and unloading these
120     modules helps to ensure the stability of the server.</p>
121
122     <p>Also, remember that while Apache supports ISAPI Extensions,
123     it <strong>does not support ISAPI Filters</strong>. Support for
124     filters may be added at a later date, but no support is planned
125     at this time.</p>
126 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
127 <div class="section">
128 <h2><a name="journal" id="journal">Programmer's Journal</a></h2>
129
130     <p>If you are programming Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>
131     modules, you must limit your calls to <code>ServerSupportFunction</code>
132     to the following directives:</p>
133
134     <dl>
135       <dt><code>HSE_REQ_SEND_URL_REDIRECT_RESP</code></dt>
136       <dd>Redirect the user to another location.<br />
137       This must be a fully qualified URL (<em>e.g.</em>
138       <code>http://server/location</code>).</dd>
139
140       <dt><code>HSE_REQ_SEND_URL</code></dt>
141       <dd>Redirect the user to another location.<br />
142       This cannot be a fully qualified URL, you are not allowed to
143       pass the protocol or a server name (<em>e.g.</em> simply
144       <code>/location</code>).<br />
145       This redirection is handled by the server, not the
146       browser.<br />
147       <div class="warning"><h3>Warning</h3>
148         <p>In their recent documentation, Microsoft appears to have
149         abandoned the distinction between the two
150         <code>HSE_REQ_SEND_URL</code> functions. Apache continues to treat
151         them as two distinct functions with different requirements
152         and behaviors.</p>
153       </div></dd>
154
155       <dt><code>HSE_REQ_SEND_RESPONSE_HEADER</code></dt>
156       <dd>Apache accepts a response body following the header if it
157       follows the blank line (two consecutive newlines) in the
158       headers string argument. This body cannot contain NULLs,
159       since the headers argument is NULL terminated.</dd>
160
161       <dt><code>HSE_REQ_DONE_WITH_SESSION</code></dt>
162       <dd>Apache considers this a no-op, since the session will be
163       finished when the ISAPI returns from processing.</dd>
164
165       <dt><code>HSE_REQ_MAP_URL_TO_PATH</code></dt>
166       <dd>Apache will translate a virtual name to a physical
167       name.</dd>
168
169       <dt><code>HSE_APPEND_LOG_PARAMETER</code></dt>
170       <dd>
171         This logged message may be captured in any of the following
172         logs:
173
174         <ul>
175           <li>in the <code>\"%{isapi-parameter}n\"</code> component in a
176           <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code>
177           directive</li>
178
179           <li>in the <code>%q</code> log component with the
180           <code class="directive"><a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></code>
181           <code>On</code> directive</li>
182
183           <li>in the error log with the <code class="directive"><a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></code> <code>On</code> directive</li>
184         </ul>
185
186         <p>The first option, the <code>%{isapi-parameter}n</code> component,
187         is always available and preferred.</p>
188       </dd>
189
190       <dt><code>HSE_REQ_IS_KEEP_CONN</code></dt>
191       <dd>Will return the negotiated Keep-Alive status.</dd>
192
193       <dt><code>HSE_REQ_SEND_RESPONSE_HEADER_EX</code></dt>
194       <dd>Will behave as documented, although the <code>fKeepConn</code>
195       flag is ignored.</dd>
196
197       <dt><code>HSE_REQ_IS_CONNECTED</code></dt>
198       <dd>Will report false if the request has been aborted.</dd>
199     </dl>
200
201     <p>Apache returns <code>FALSE</code> to any unsupported call to
202     <code>ServerSupportFunction</code>, and sets the
203     <code>GetLastError</code> value to
204     <code>ERROR_INVALID_PARAMETER</code>.</p>
205
206     <p><code>ReadClient</code> retrieves the request body exceeding the
207     initial buffer (defined by <code class="directive"><a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></code>). Based on the
208     <code class="directive">ISAPIReadAheadBuffer</code> setting (number of bytes
209     to buffer prior to calling the ISAPI handler) shorter requests are sent
210     complete to the extension when it is invoked. If the request is
211     longer, the ISAPI extension must use <code>ReadClient</code> to
212     retrieve the remaining request body.</p>
213
214     <p><code>WriteClient</code> is supported, but only with the
215     <code>HSE_IO_SYNC</code> flag or no option flag (value of
216     <code>0</code>). Any other <code>WriteClient</code> request
217     will be rejected with a return value of <code>FALSE</code>, and a
218     <code>GetLastError</code> value of
219     <code>ERROR_INVALID_PARAMETER</code>.</p>
220
221     <p><code>GetServerVariable</code> is supported, although extended server
222     variables do not exist (as defined by other servers.) All the
223     usual Apache CGI environment variables are available from
224     <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
225     and <code>ALL_RAW</code> values.</p>
226
227     <p>Apache httpd 2.0+ <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> supports additional
228     features introduced in later versions of the ISAPI specification,
229     as well as limited emulation of async I/O and the
230     <code>TransmitFile</code> semantics. Apache httpd also supports preloading
231     ISAPI .dlls for performance.</p>
232 </div>
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>
244 </table>
245     <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
246     extensions to the server error log.</p>
247
248 </div>
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>
260 </table>
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>
263     component).</p>
264
265 </div>
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>]
271 ...</code></td></tr>
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>
275 </table>
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>
282
283 </div>
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>
294 </table>
295     <p>While set to on, asynchronous support for ISAPI callbacks is
296     simulated.</p>
297
298 </div>
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
303 extensions</td></tr>
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>
310 </table>
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>
315
316 </div>
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
321 extensions</td></tr>
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>
328 </table>
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>
334
335 </div>
336 </div>
337 <div class="bottomlang">
338 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English">&nbsp;en&nbsp;</a> |
339 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
340 </div><div id="footer">
341 <p class="apache">Copyright 2011 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>
343 </body></html>