]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_isapi.html.en
a few new translations and up-to-date patches
[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.1</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-project/">Documentation</a> &gt; <a href="../">Version 2.1</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-isa</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-isa .dll
73     </code></p></div>
74
75     <p>There is no capability within the Apache server to leave a
76     requested module loaded. However, you may preload and keep a
77     specific module loaded by using the following syntax in your
78     httpd.conf:</p>
79     <div class="example"><p><code>
80         ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
81     </code></p></div>
82
83     <p>Whether or not you have preloaded an ISAPI extension, all
84     ISAPI extensions are governed by the same permissions and
85     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
86     directory that contains the ISAPI .dll file.</p>
87
88     <p>Review the <a href="#notes">Additional Notes</a> and the <a href="#journal">Programmer's Journal</a> for additional details
89     and clarification of the specific ISAPI support offered by
90     <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>.</p>
91 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
92 <div class="section">
93 <h2><a name="notes" id="notes">Additional Notes</a></h2>
94
95     <p>Apache's ISAPI implementation conforms to all of the ISAPI
96     2.0 specification, except for some "Microsoft-specific"
97     extensions dealing with asynchronous I/O. Apache's I/O model
98     does not allow asynchronous reading and writing in a manner
99     that the ISAPI could access. If an ISA tries to access
100     unsupported features, including async I/O, a message is placed
101     in the error log to help with debugging. Since these messages
102     can become a flood, the directive <code>ISAPILogNotSupported
103     Off</code> exists to quiet this noise.</p>
104
105     <p>Some servers, like Microsoft IIS, load the ISAPI extension
106     into the server and keep it loaded until memory usage is too
107     high, or unless configuration options are specified. Apache
108     currently loads and unloads the ISAPI extension each time it is
109     requested, unless the <code class="directive"><a href="#isapicachefile">ISAPICacheFile</a></code> directive is specified.
110     This is inefficient, but Apache's memory model makes this the
111     most effective method. Many ISAPI modules are subtly
112     incompatible with the Apache server, and unloading these
113     modules helps to ensure the stability of the server.</p>
114
115     <p>Also, remember that while Apache supports ISAPI Extensions,
116     it <strong>does not support ISAPI Filters</strong>. Support for
117     filters may be added at a later date, but no support is planned
118     at this time.</p>
119 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
120 <div class="section">
121 <h2><a name="journal" id="journal">Programmer's Journal</a></h2>
122
123     <p>If you are programming Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code>
124     modules, you must limit your calls to <code>ServerSupportFunction</code>
125     to the following directives:</p>
126
127     <dl>
128       <dt><code>HSE_REQ_SEND_URL_REDIRECT_RESP</code></dt>
129       <dd>Redirect the user to another location.<br />
130       This must be a fully qualified URL (<em>e.g.</em>
131       <code>http://server/location</code>).</dd>
132
133       <dt><code>HSE_REQ_SEND_URL</code></dt>
134       <dd>Redirect the user to another location.<br />
135       This cannot be a fully qualified URL, you are not allowed to
136       pass the protocol or a server name (<em>e.g.</em> simply
137       <code>/location</code>).<br />
138       This redirection is handled by the server, not the
139       browser.<br />
140       <div class="warning"><h3>Warning</h3>
141         <p>In their recent documentation, Microsoft appears to have
142         abandoned the distinction between the two
143         <code>HSE_REQ_SEND_URL</code> functions. Apache continues to treat
144         them as two distinct functions with different requirements
145         and behaviors.</p>
146       </div></dd>
147
148       <dt><code>HSE_REQ_SEND_RESPONSE_HEADER</code></dt>
149       <dd>Apache accepts a response body following the header if it
150       follows the blank line (two consecutive newlines) in the
151       headers string argument. This body cannot contain NULLs,
152       since the headers argument is NULL terminated.</dd>
153
154       <dt><code>HSE_REQ_DONE_WITH_SESSION</code></dt>
155       <dd>Apache considers this a no-op, since the session will be
156       finished when the ISAPI returns from processing.</dd>
157
158       <dt><code>HSE_REQ_MAP_URL_TO_PATH</code></dt>
159       <dd>Apache will translate a virtual name to a physical
160       name.</dd>
161
162       <dt><code>HSE_APPEND_LOG_PARAMETER</code></dt>
163       <dd>
164         This logged message may be captured in any of the following
165         logs:
166
167         <ul>
168           <li>in the <code>\"%{isapi-parameter}n\"</code> component in a
169           <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code>
170           directive</li>
171
172           <li>in the <code>%q</code> log component with the
173           <code class="directive"><a href="#isapiappendlogtoquery">ISAPIAppendLogToQuery</a></code>
174           <code>On</code> directive</li>
175
176           <li>in the error log with the <code class="directive"><a href="#isapiappendlogtoerrors">ISAPIAppendLogToErrors</a></code> <code>On</code> directive</li>
177         </ul>
178
179         <p>The first option, the <code>%{isapi-parameter}n</code> component,
180         is always available and preferred.</p>
181       </dd>
182
183       <dt><code>HSE_REQ_IS_KEEP_CONN</code></dt>
184       <dd>Will return the negotiated Keep-Alive status.</dd>
185
186       <dt><code>HSE_REQ_SEND_RESPONSE_HEADER_EX</code></dt>
187       <dd>Will behave as documented, although the <code>fKeepConn</code>
188       flag is ignored.</dd>
189
190       <dt><code>HSE_REQ_IS_CONNECTED</code></dt>
191       <dd>Will report false if the request has been aborted.</dd>
192     </dl>
193
194     <p>Apache returns <code>FALSE</code> to any unsupported call to
195     <code>ServerSupportFunction</code>, and sets the
196     <code>GetLastError</code> value to
197     <code>ERROR_INVALID_PARAMETER</code>.</p>
198
199     <p><code>ReadClient</code> retrieves the request body exceeding the
200     initial buffer (defined by <code class="directive"><a href="#isapireadaheadbuffer">ISAPIReadAheadBuffer</a></code>). Based on the
201     <code class="directive">ISAPIReadAheadBuffer</code> setting (number of bytes
202     to buffer prior to calling the ISAPI handler) shorter requests are sent
203     complete to the extension when it is invoked. If the request is
204     longer, the ISAPI extension must use <code>ReadClient</code> to
205     retrieve the remaining request body.</p>
206
207     <p><code>WriteClient</code> is supported, but only with the
208     <code>HSE_IO_SYNC</code> flag or no option flag (value of
209     <code>0</code>). Any other <code>WriteClient</code> request
210     will be rejected with a return value of <code>FALSE</code>, and a
211     <code>GetLastError</code> value of
212     <code>ERROR_INVALID_PARAMETER</code>.</p>
213
214     <p><code>GetServerVariable</code> is supported, although extended server
215     variables do not exist (as defined by other servers.) All the
216     usual Apache CGI environment variables are available from
217     <code>GetServerVariable</code>, as well as the <code>ALL_HTTP</code>
218     and <code>ALL_RAW</code> values.</p>
219
220     <p>Apache 2.0 <code class="module"><a href="../mod/mod_isapi.html">mod_isapi</a></code> supports additional
221     features introduced in later versions of the ISAPI specification,
222     as well as limited emulation of async I/O and the
223     <code>TransmitFile</code> semantics.  Apache also supports preloading
224     ISAPI .dlls for performance, neither of which were not available under
225     Apache 1.3 <code>mod_isapi</code>.</p>
226 </div>
227 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
228 <div class="directive-section"><h2><a name="ISAPIAppendLogToErrors" id="ISAPIAppendLogToErrors">ISAPIAppendLogToErrors</a> <a name="isapiappendlogtoerrors" id="isapiappendlogtoerrors">Directive</a></h2>
229 <table class="directive">
230 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record HSE_APPEND_LOG_PARAMETER requests from
231 ISAPI extensions to the error log</td></tr>
232 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToErrors on|off</code></td></tr>
233 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToErrors off</code></td></tr>
234 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
235 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
236 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
237 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
238 </table>
239     <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
240     extensions to the server error log.</p>
241
242 </div>
243 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
244 <div class="directive-section"><h2><a name="ISAPIAppendLogToQuery" id="ISAPIAppendLogToQuery">ISAPIAppendLogToQuery</a> <a name="isapiappendlogtoquery" id="isapiappendlogtoquery">Directive</a></h2>
245 <table class="directive">
246 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Record HSE_APPEND_LOG_PARAMETER requests from
247 ISAPI extensions to the query field</td></tr>
248 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIAppendLogToQuery on|off</code></td></tr>
249 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIAppendLogToQuery on</code></td></tr>
250 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
251 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
252 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
253 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
254 </table>
255     <p>Record <code>HSE_APPEND_LOG_PARAMETER</code> requests from ISAPI
256     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>
257     component).</p>
258
259 </div>
260 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
261 <div class="directive-section"><h2><a name="ISAPICacheFile" id="ISAPICacheFile">ISAPICacheFile</a> <a name="isapicachefile" id="isapicachefile">Directive</a></h2>
262 <table class="directive">
263 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>ISAPI .dll files to be loaded at startup</td></tr>
264 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPICacheFile <var>file-path</var> [<var>file-path</var>]
265 ...</code></td></tr>
266 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
267 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
268 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
269 </table>
270     <p>Specifies a space-separated list of file names to be loaded
271     when the Apache server is launched, and remain loaded until the
272     server is shut down. This directive may be repeated for every
273     ISAPI .dll file desired. The full path name of each file should
274     be specified. If the path name is not absolute, it will be treated
275     relative to <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>.</p>
276
277 </div>
278 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
279 <div class="directive-section"><h2><a name="ISAPIFakeAsync" id="ISAPIFakeAsync">ISAPIFakeAsync</a> <a name="isapifakeasync" id="isapifakeasync">Directive</a></h2>
280 <table class="directive">
281 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fake asynchronous support for ISAPI callbacks</td></tr>
282 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIFakeAsync on|off</code></td></tr>
283 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIFakeAsync off</code></td></tr>
284 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
285 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
286 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
287 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
288 </table>
289     <p>While set to on, asynchronous support for ISAPI callbacks is
290     simulated.</p>
291
292 </div>
293 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
294 <div class="directive-section"><h2><a name="ISAPILogNotSupported" id="ISAPILogNotSupported">ISAPILogNotSupported</a> <a name="isapilognotsupported" id="isapilognotsupported">Directive</a></h2>
295 <table class="directive">
296 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Log unsupported feature requests from ISAPI
297 extensions</td></tr>
298 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPILogNotSupported on|off</code></td></tr>
299 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPILogNotSupported off</code></td></tr>
300 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
301 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
302 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
303 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
304 </table>
305     <p>Logs all requests for unsupported features from ISAPI
306     extensions in the server error log. This may help administrators
307     to track down problems. Once set to on and all desired ISAPI modules
308     are functioning, it should be set back to off.</p>
309
310 </div>
311 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
312 <div class="directive-section"><h2><a name="ISAPIReadAheadBuffer" id="ISAPIReadAheadBuffer">ISAPIReadAheadBuffer</a> <a name="isapireadaheadbuffer" id="isapireadaheadbuffer">Directive</a></h2>
313 <table class="directive">
314 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size of the Read Ahead Buffer sent to ISAPI
315 extensions</td></tr>
316 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ISAPIReadAheadBuffer <var>size</var></code></td></tr>
317 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ISAPIReadAheadBuffer 49152</code></td></tr>
318 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
319 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
320 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
321 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_isapi</td></tr>
322 </table>
323     <p>Defines the maximum size of the Read Ahead Buffer sent to
324     ISAPI extensions when they are initially invoked. All remaining
325     data must be retrieved using the <code>ReadClient</code> callback; some
326     ISAPI extensions may not support the <code>ReadClient</code> function.
327     Refer questions to the ISAPI extension's author.</p>
328
329 </div>
330 </div>
331 <div class="bottomlang">
332 <p><span>Available Languages: </span><a href="../en/mod/mod_isapi.html" title="English">&nbsp;en&nbsp;</a> |
333 <a href="../ko/mod/mod_isapi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
334 </div><div id="footer">
335 <p class="apache">Copyright 1999-2004 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>
336 <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>
337 </body></html>