~ubuntu-branches/ubuntu/trusty/ocamlnet/trusty

« back to all changes in this revision

Viewing changes to doc/html-main/Netcgi.html

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-09-02 14:12:33 UTC
  • mfrom: (18.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110902141233-zbj0ygxb92u6gy4z
Tags: 3.4-1
* New upstream release
  - add a new NetcgiRequire directive to ease dependency management
    (Closes: #637147)
  - remove patches that were applied upstream:
    + Added-missing-shebang-lines-in-example-shell-scripts
    + Try-also-ocamlc-for-POSIX-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
<link title="Index of modules" rel=Appendix href="index_modules.html">
18
18
<link title="Index of module types" rel=Appendix href="index_module_types.html">
19
19
<link title="Uq_gtk" rel="Chapter" href="Uq_gtk.html">
 
20
<link title="Uq_ssl" rel="Chapter" href="Uq_ssl.html">
 
21
<link title="Https_client" rel="Chapter" href="Https_client.html">
 
22
<link title="Uq_tcl" rel="Chapter" href="Uq_tcl.html">
20
23
<link title="Equeue" rel="Chapter" href="Equeue.html">
21
24
<link title="Unixqueue" rel="Chapter" href="Unixqueue.html">
 
25
<link title="Unixqueue_pollset" rel="Chapter" href="Unixqueue_pollset.html">
 
26
<link title="Unixqueue_select" rel="Chapter" href="Unixqueue_select.html">
 
27
<link title="Uq_resolver" rel="Chapter" href="Uq_resolver.html">
22
28
<link title="Uq_engines" rel="Chapter" href="Uq_engines.html">
23
29
<link title="Uq_socks5" rel="Chapter" href="Uq_socks5.html">
24
 
<link title="Unixqueue_mt" rel="Chapter" href="Unixqueue_mt.html">
 
30
<link title="Uq_io" rel="Chapter" href="Uq_io.html">
 
31
<link title="Uq_lwt" rel="Chapter" href="Uq_lwt.html">
 
32
<link title="Uq_libevent" rel="Chapter" href="Uq_libevent.html">
25
33
<link title="Equeue_intro" rel="Chapter" href="Equeue_intro.html">
26
 
<link title="Uq_ssl" rel="Chapter" href="Uq_ssl.html">
27
 
<link title="Uq_tcl" rel="Chapter" href="Uq_tcl.html">
 
34
<link title="Netcamlbox" rel="Chapter" href="Netcamlbox.html">
 
35
<link title="Netcgi_apache" rel="Chapter" href="Netcgi_apache.html">
 
36
<link title="Netcgi_modtpl" rel="Chapter" href="Netcgi_modtpl.html">
 
37
<link title="Netcgi_plex" rel="Chapter" href="Netcgi_plex.html">
28
38
<link title="Netcgi_common" rel="Chapter" href="Netcgi_common.html">
29
39
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
30
40
<link title="Netcgi_ajp" rel="Chapter" href="Netcgi_ajp.html">
35
45
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html">
36
46
<link title="Netcgi_test" rel="Chapter" href="Netcgi_test.html">
37
47
<link title="Netcgi_porting" rel="Chapter" href="Netcgi_porting.html">
38
 
<link title="Netcgi_plex" rel="Chapter" href="Netcgi_plex.html">
 
48
<link title="Http_client_conncache" rel="Chapter" href="Http_client_conncache.html">
39
49
<link title="Http_client" rel="Chapter" href="Http_client.html">
40
50
<link title="Telnet_client" rel="Chapter" href="Telnet_client.html">
41
51
<link title="Ftp_data_endpoint" rel="Chapter" href="Ftp_data_endpoint.html">
42
52
<link title="Ftp_client" rel="Chapter" href="Ftp_client.html">
 
53
<link title="Http_fs" rel="Chapter" href="Http_fs.html">
 
54
<link title="Ftp_fs" rel="Chapter" href="Ftp_fs.html">
 
55
<link title="Netclient_tut" rel="Chapter" href="Netclient_tut.html">
 
56
<link title="Netgssapi" rel="Chapter" href="Netgssapi.html">
43
57
<link title="Nethttpd_types" rel="Chapter" href="Nethttpd_types.html">
44
58
<link title="Nethttpd_kernel" rel="Chapter" href="Nethttpd_kernel.html">
45
59
<link title="Nethttpd_reactor" rel="Chapter" href="Nethttpd_reactor.html">
46
60
<link title="Nethttpd_engine" rel="Chapter" href="Nethttpd_engine.html">
47
61
<link title="Nethttpd_services" rel="Chapter" href="Nethttpd_services.html">
48
62
<link title="Nethttpd_plex" rel="Chapter" href="Nethttpd_plex.html">
 
63
<link title="Nethttpd_util" rel="Chapter" href="Nethttpd_util.html">
49
64
<link title="Nethttpd_intro" rel="Chapter" href="Nethttpd_intro.html">
 
65
<link title="Netmech_scram" rel="Chapter" href="Netmech_scram.html">
 
66
<link title="Netmech_scram_gssapi" rel="Chapter" href="Netmech_scram_gssapi.html">
 
67
<link title="Netmcore" rel="Chapter" href="Netmcore.html">
 
68
<link title="Netmcore_camlbox" rel="Chapter" href="Netmcore_camlbox.html">
 
69
<link title="Netmcore_mempool" rel="Chapter" href="Netmcore_mempool.html">
 
70
<link title="Netmcore_heap" rel="Chapter" href="Netmcore_heap.html">
 
71
<link title="Netmcore_ref" rel="Chapter" href="Netmcore_ref.html">
 
72
<link title="Netmcore_array" rel="Chapter" href="Netmcore_array.html">
 
73
<link title="Netmcore_sem" rel="Chapter" href="Netmcore_sem.html">
 
74
<link title="Netmcore_mutex" rel="Chapter" href="Netmcore_mutex.html">
 
75
<link title="Netmcore_condition" rel="Chapter" href="Netmcore_condition.html">
 
76
<link title="Netmcore_queue" rel="Chapter" href="Netmcore_queue.html">
 
77
<link title="Netmcore_buffer" rel="Chapter" href="Netmcore_buffer.html">
 
78
<link title="Netmcore_matrix" rel="Chapter" href="Netmcore_matrix.html">
 
79
<link title="Netmcore_hashtbl" rel="Chapter" href="Netmcore_hashtbl.html">
 
80
<link title="Netmcore_process" rel="Chapter" href="Netmcore_process.html">
 
81
<link title="Netmcore_tut" rel="Chapter" href="Netmcore_tut.html">
50
82
<link title="Netplex_types" rel="Chapter" href="Netplex_types.html">
51
83
<link title="Netplex_mp" rel="Chapter" href="Netplex_mp.html">
52
84
<link title="Netplex_mt" rel="Chapter" href="Netplex_mt.html">
60
92
<link title="Netplex_kit" rel="Chapter" href="Netplex_kit.html">
61
93
<link title="Rpc_netplex" rel="Chapter" href="Rpc_netplex.html">
62
94
<link title="Netplex_cenv" rel="Chapter" href="Netplex_cenv.html">
 
95
<link title="Netplex_semaphore" rel="Chapter" href="Netplex_semaphore.html">
 
96
<link title="Netplex_sharedvar" rel="Chapter" href="Netplex_sharedvar.html">
 
97
<link title="Netplex_mutex" rel="Chapter" href="Netplex_mutex.html">
 
98
<link title="Netplex_encap" rel="Chapter" href="Netplex_encap.html">
63
99
<link title="Netplex_intro" rel="Chapter" href="Netplex_intro.html">
 
100
<link title="Netplex_advanced" rel="Chapter" href="Netplex_advanced.html">
 
101
<link title="Netplex_admin" rel="Chapter" href="Netplex_admin.html">
64
102
<link title="Netshm" rel="Chapter" href="Netshm.html">
65
103
<link title="Netshm_data" rel="Chapter" href="Netshm_data.html">
66
104
<link title="Netshm_hashtbl" rel="Chapter" href="Netshm_hashtbl.html">
83
121
<link title="Nethtml" rel="Chapter" href="Nethtml.html">
84
122
<link title="Netstring_str" rel="Chapter" href="Netstring_str.html">
85
123
<link title="Netstring_pcre" rel="Chapter" href="Netstring_pcre.html">
86
 
<link title="Netstring_mt" rel="Chapter" href="Netstring_mt.html">
87
124
<link title="Netmappings" rel="Chapter" href="Netmappings.html">
88
125
<link title="Netaux" rel="Chapter" href="Netaux.html">
89
126
<link title="Nethttp" rel="Chapter" href="Nethttp.html">
 
127
<link title="Netpagebuffer" rel="Chapter" href="Netpagebuffer.html">
 
128
<link title="Netfs" rel="Chapter" href="Netfs.html">
 
129
<link title="Netglob" rel="Chapter" href="Netglob.html">
 
130
<link title="Netauth" rel="Chapter" href="Netauth.html">
 
131
<link title="Netsockaddr" rel="Chapter" href="Netsockaddr.html">
 
132
<link title="Netnumber" rel="Chapter" href="Netnumber.html">
 
133
<link title="Rtypes" rel="Chapter" href="Rtypes.html">
 
134
<link title="Xdr_mstring" rel="Chapter" href="Xdr_mstring.html">
 
135
<link title="Xdr" rel="Chapter" href="Xdr.html">
 
136
<link title="Netcompression" rel="Chapter" href="Netcompression.html">
90
137
<link title="Netchannels_tut" rel="Chapter" href="Netchannels_tut.html">
91
138
<link title="Netmime_tut" rel="Chapter" href="Netmime_tut.html">
92
139
<link title="Netsendmail_tut" rel="Chapter" href="Netsendmail_tut.html">
93
140
<link title="Netulex_tut" rel="Chapter" href="Netulex_tut.html">
94
141
<link title="Neturl_tut" rel="Chapter" href="Neturl_tut.html">
95
142
<link title="Netsys" rel="Chapter" href="Netsys.html">
 
143
<link title="Netsys_posix" rel="Chapter" href="Netsys_posix.html">
 
144
<link title="Netsys_pollset" rel="Chapter" href="Netsys_pollset.html">
 
145
<link title="Netlog" rel="Chapter" href="Netlog.html">
 
146
<link title="Netexn" rel="Chapter" href="Netexn.html">
 
147
<link title="Netsys_win32" rel="Chapter" href="Netsys_win32.html">
 
148
<link title="Netsys_pollset_posix" rel="Chapter" href="Netsys_pollset_posix.html">
 
149
<link title="Netsys_pollset_win32" rel="Chapter" href="Netsys_pollset_win32.html">
 
150
<link title="Netsys_pollset_generic" rel="Chapter" href="Netsys_pollset_generic.html">
 
151
<link title="Netsys_signal" rel="Chapter" href="Netsys_signal.html">
 
152
<link title="Netsys_oothr" rel="Chapter" href="Netsys_oothr.html">
 
153
<link title="Netsys_xdr" rel="Chapter" href="Netsys_xdr.html">
 
154
<link title="Netsys_rng" rel="Chapter" href="Netsys_rng.html">
 
155
<link title="Netsys_types" rel="Chapter" href="Netsys_types.html">
 
156
<link title="Netsys_mem" rel="Chapter" href="Netsys_mem.html">
 
157
<link title="Netsys_tmp" rel="Chapter" href="Netsys_tmp.html">
 
158
<link title="Netgzip" rel="Chapter" href="Netgzip.html">
96
159
<link title="Netpop" rel="Chapter" href="Netpop.html">
97
160
<link title="Rpc_auth_dh" rel="Chapter" href="Rpc_auth_dh.html">
98
161
<link title="Rpc_key_service" rel="Chapter" href="Rpc_key_service.html">
99
162
<link title="Rpc_time" rel="Chapter" href="Rpc_time.html">
100
163
<link title="Rpc_auth_local" rel="Chapter" href="Rpc_auth_local.html">
101
 
<link title="Rtypes" rel="Chapter" href="Rtypes.html">
102
 
<link title="Xdr" rel="Chapter" href="Xdr.html">
 
164
<link title="Rpc_ssl" rel="Chapter" href="Rpc_ssl.html">
 
165
<link title="Rpc_xti_client" rel="Chapter" href="Rpc_xti_client.html">
103
166
<link title="Rpc" rel="Chapter" href="Rpc.html">
104
167
<link title="Rpc_program" rel="Chapter" href="Rpc_program.html">
 
168
<link title="Rpc_util" rel="Chapter" href="Rpc_util.html">
105
169
<link title="Rpc_portmapper_aux" rel="Chapter" href="Rpc_portmapper_aux.html">
106
170
<link title="Rpc_packer" rel="Chapter" href="Rpc_packer.html">
107
171
<link title="Rpc_transport" rel="Chapter" href="Rpc_transport.html">
111
175
<link title="Rpc_portmapper" rel="Chapter" href="Rpc_portmapper.html">
112
176
<link title="Rpc_server" rel="Chapter" href="Rpc_server.html">
113
177
<link title="Rpc_auth_sys" rel="Chapter" href="Rpc_auth_sys.html">
 
178
<link title="Rpc_auth_gssapi" rel="Chapter" href="Rpc_auth_gssapi.html">
 
179
<link title="Rpc_proxy" rel="Chapter" href="Rpc_proxy.html">
114
180
<link title="Rpc_intro" rel="Chapter" href="Rpc_intro.html">
115
181
<link title="Rpc_mapping_ref" rel="Chapter" href="Rpc_mapping_ref.html">
116
 
<link title="Rpc_ssl" rel="Chapter" href="Rpc_ssl.html">
117
 
<link title="Rpc_xti_client" rel="Chapter" href="Rpc_xti_client.html">
 
182
<link title="Rpc_intro_gss" rel="Chapter" href="Rpc_intro_gss.html">
118
183
<link title="Shell_sys" rel="Chapter" href="Shell_sys.html">
119
184
<link title="Shell" rel="Chapter" href="Shell.html">
120
185
<link title="Shell_uq" rel="Chapter" href="Shell_uq.html">
121
 
<link title="Shell_mt" rel="Chapter" href="Shell_mt.html">
 
186
<link title="Shell_fs" rel="Chapter" href="Shell_fs.html">
122
187
<link title="Shell_intro" rel="Chapter" href="Shell_intro.html">
123
 
<link title="Netsmtp" rel="Chapter" href="Netsmtp.html"><link title="Arguments" rel="Section" href="#2_Arguments">
 
188
<link title="Netsmtp" rel="Chapter" href="Netsmtp.html">
 
189
<link title="Intro" rel="Chapter" href="Intro.html">
 
190
<link title="Platform" rel="Chapter" href="Platform.html">
 
191
<link title="Foreword" rel="Chapter" href="Foreword.html">
 
192
<link title="Ipv6" rel="Chapter" href="Ipv6.html"><link title="Arguments" rel="Section" href="#2_Arguments">
124
193
<link title="Cookies" rel="Section" href="#2_Cookies">
125
194
<link title="The environment of a request" rel="Section" href="#2_Theenvironmentofarequest">
126
195
<link title="CGI object" rel="Section" href="#2_CGIobject">
127
196
<link title="Connectors" rel="Section" href="#2_Connectors">
128
 
<title>Ocamlnet 2 Reference Manual : Netcgi</title>
 
197
<title>Ocamlnet 3 Reference Manual : Netcgi</title>
129
198
</head>
130
199
<body>
131
200
<div class="navbar"><a href="Netcgi_common.html">Previous</a>
149
218
 <a href="http://pauillac.inria.fr/~xleroy/software.html#cryptokit">Cryptokit</a>.<br>
150
219
<hr width="100%">
151
220
<br>
152
 
<a name="2_Arguments"></a>
153
 
<h2>Arguments</h2><br>
154
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi_argument"></a><a href="Netcgi.cgi_argument.html">cgi_argument</a> = <code class="code">object</code> <a href="Netcgi.cgi_argument.html">..</a> <code class="code">end</code></pre><div class="info">
 
221
<span id="2_Arguments"><h2>Arguments</h2></span><br>
 
222
<pre><span id="TYPEcgi_argument"><span class="keyword">class type</span> <a href="Netcgi.cgi_argument-c.html">cgi_argument</a></span> = <code class="code">object</code> <a href="Netcgi.cgi_argument-c.html">..</a> <code class="code">end</code></pre><div class="info">
155
223
Represent a key-value pair of data passed to the script (including
156
224
    file uploads).
157
225
</div>
158
226
<pre><span class="keyword">module</span> <a href="Netcgi.Argument.html">Argument</a>: <code class="code">sig</code> <a href="Netcgi.Argument.html">..</a> <code class="code">end</code></pre><div class="info">
159
227
Operations on arguments and lists of thereof.
160
228
</div>
161
 
<pre><span class="keyword">class type</span> <a name="TYPErw_cgi_argument"></a><a href="Netcgi.rw_cgi_argument.html">rw_cgi_argument</a> = <code class="code">object</code> <a href="Netcgi.rw_cgi_argument.html">..</a> <code class="code">end</code></pre><div class="info">
 
229
<pre><span id="TYPErw_cgi_argument"><span class="keyword">class type</span> <a href="Netcgi.rw_cgi_argument-c.html">rw_cgi_argument</a></span> = <code class="code">object</code> <a href="Netcgi.rw_cgi_argument-c.html">..</a> <code class="code">end</code></pre><div class="info">
162
230
<font color="#CCCCCC">Old deprecated writable argument type.
163
231
</font></div>
164
 
<pre><span class="keyword">class</span> <a name="TYPEsimple_argument"></a><a href="Netcgi.simple_argument.html">simple_argument</a> : <code class="type">?ro:bool -> string -> string -> </code><code class="type"><a href="Netcgi.rw_cgi_argument.html">rw_cgi_argument</a></code></pre><div class="info">
 
232
<pre><span name="TYPEsimple_argument"><span class="keyword">class</span> <a href="Netcgi.simple_argument-c.html">simple_argument</a></span> : <code class="type">?ro:bool -> string -> string -> </code><code class="type"><a href="Netcgi.rw_cgi_argument-c.html">rw_cgi_argument</a></code></pre><div class="info">
165
233
<font color="#CCCCCC">Old deprecated simple argument class.
166
234
</font></div>
167
 
<pre><span class="keyword">class</span> <a name="TYPEmime_argument"></a><a href="Netcgi.mime_argument.html">mime_argument</a> : <code class="type">?work_around_backslash_bug:bool -> string -> <a href="Netmime.html#TYPEmime_message">Netmime.mime_message</a> -> </code><code class="type"><a href="Netcgi.rw_cgi_argument.html">rw_cgi_argument</a></code></pre><div class="info">
 
235
<pre><span name="TYPEmime_argument"><span class="keyword">class</span> <a href="Netcgi.mime_argument-c.html">mime_argument</a></span> : <code class="type">?work_around_backslash_bug:bool -> string -> <a href="Netmime.html#TYPEmime_message">Netmime.mime_message</a> -> </code><code class="type"><a href="Netcgi.rw_cgi_argument-c.html">rw_cgi_argument</a></code></pre><div class="info">
168
236
<font color="#CCCCCC">Old deprecated MIME argument class.
169
237
</font></div>
170
238
<br>
171
 
<a name="2_Cookies"></a>
172
 
<h2>Cookies</h2><br>
 
239
<span id="2_Cookies"><h2>Cookies</h2></span><br>
173
240
<pre><span class="keyword">module</span> <a href="Netcgi.Cookie.html">Cookie</a>: <code class="code">sig</code> <a href="Netcgi.Cookie.html">..</a> <code class="code">end</code></pre><div class="info">
174
241
Functions to manipulate cookies.
175
242
</div>
176
243
<br>
177
 
<a name="2_Theenvironmentofarequest"></a>
178
 
<h2>The environment of a request</h2><br>
179
 
<pre><span class="keyword">type</span> <a name="TYPEconfig"></a><code class="type"></code>config = <code class="type"><a href="Netcgi_common.html#TYPEconfig">Netcgi_common.config</a></code> = {</pre><table class="typetable">
 
244
<span id="2_Theenvironmentofarequest"><h2>The environment of a request</h2></span><br>
 
245
<pre><span id="TYPEhttp_method"><span class="keyword">type</span> <code class="type"></code>http_method</span> = <code class="type">[ `DELETE | `GET | `HEAD | `POST | `PUT ]</code> </pre>
 
246
 
 
247
<pre><span id="TYPEconfig"><span class="keyword">type</span> <code class="type"></code>config</span> = <code class="type"><a href="Netcgi_common.html#TYPEconfig">Netcgi_common.config</a></code> = {</pre><table class="typetable">
180
248
<tr>
181
249
<td align="left" valign="top" >
182
250
<code>&nbsp;&nbsp;</code></td>
197
265
<td align="left" valign="top" >
198
266
<code>&nbsp;&nbsp;</code></td>
199
267
<td align="left" valign="top" >
200
 
<code>permitted_http_methods&nbsp;: <code class="type">[ `DELETE | `GET | `HEAD | `POST | `PUT ] list</code>;</code></td>
 
268
<code>permitted_http_methods&nbsp;: <code class="type"><a href="Netcgi.html#TYPEhttp_method">http_method</a> list</code>;</code></td>
201
269
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >The list of accepted HTTP methods</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
202
270
</tr>
203
271
<tr>
253
321
}
254
322
 
255
323
 
256
 
<pre><span class="keyword">val</span> <a name="VALdefault_config"></a>default_config : <code class="type"><a href="Netcgi.html#TYPEconfig">config</a></code></pre><div class="info">
 
324
<pre><span id="VALdefault_config"><span class="keyword">val</span> default_config</span> : <code class="type"><a href="Netcgi.html#TYPEconfig">config</a></code></pre><div class="info">
257
325
The default configuration is:<ul>
258
 
<li><code class="code">tmp_directory</code>: one of /var/tmp, /tmp, C:\temp, current directory.</li>
 
326
<li><code class="code">tmp_directory</code>: <code class="code">Netsys_tmp.tmp_directory()</code></li>
259
327
<li><code class="code">tmp_prefix</code>: "netcgi"</li>
260
328
<li><code class="code">permitted_http_methods</code>: <code class="code">`GET</code>, <code class="code">`HEAD</code>, <code class="code">`POST</code>.</li>
261
329
<li><code class="code">permitted_input_content_types</code>: <code class="code">"multipart/form-data"</code>,
271
339
      (This syntax is also robust w.r.t. the possible addition of new
272
340
      config flields.)<br>
273
341
</div>
274
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi_environment"></a><a href="Netcgi.cgi_environment.html">cgi_environment</a> = <code class="code">object</code> <a href="Netcgi.cgi_environment.html">..</a> <code class="code">end</code></pre><div class="info">
 
342
<pre><span id="TYPEcgi_environment"><span class="keyword">class type</span> <a href="Netcgi.cgi_environment-c.html">cgi_environment</a></span> = <code class="code">object</code> <a href="Netcgi.cgi_environment-c.html">..</a> <code class="code">end</code></pre><div class="info">
275
343
The environment of a request consists of the information available
276
344
    besides the data sent by the user (as key-value pairs).
277
345
</div>
278
346
<br>
279
 
<a name="2_CGIobject"></a>
280
 
<h2>CGI object</h2><br>
281
 
<pre><span class="keyword">type</span> <a name="TYPEother_url_spec"></a><code class="type"></code>other_url_spec = <code class="type">[ `Env | `None | `This of string ]</code> </pre>
 
347
<span id="2_CGIobject"><h2>CGI object</h2></span><br>
 
348
<pre><span id="TYPEother_url_spec"><span class="keyword">type</span> <code class="type"></code>other_url_spec</span> = <code class="type">[ `Env | `None | `This of string ]</code> </pre>
282
349
<div class="info">
283
350
Determines how an URL part is generated:<ul>
284
351
<li><code class="code">`Env</code>: Take the value from the environment.</li>
288
355
<br>
289
356
</div>
290
357
 
291
 
<pre><span class="keyword">type</span> <a name="TYPEquery_string_spec"></a><code class="type"></code>query_string_spec = <code class="type">[ `Args of <a href="Netcgi.rw_cgi_argument.html">rw_cgi_argument</a> list<br>       | `Env<br>       | `None<br>       | `This of <a href="Netcgi.cgi_argument.html">cgi_argument</a> list ]</code> </pre>
 
358
<pre><span id="TYPEquery_string_spec"><span class="keyword">type</span> <code class="type"></code>query_string_spec</span> = <code class="type">[ `Args of <a href="Netcgi.rw_cgi_argument-c.html">rw_cgi_argument</a> list<br>       | `Env<br>       | `None<br>       | `This of <a href="Netcgi.cgi_argument-c.html">cgi_argument</a> list ]</code> </pre>
292
359
<div class="info">
293
360
Determines how the query part of URLs is generated:<ul>
294
361
<li><code class="code">`Env</code>: The query string of the current request.</li>
301
368
<br>
302
369
</div>
303
370
 
304
 
<pre><span class="keyword">type</span> <a name="TYPEcache_control"></a><code class="type"></code>cache_control = <code class="type">[ `Max_age of int | `No_cache | `Unspecified ]</code> </pre>
 
371
<pre><span id="TYPEcache_control"><span class="keyword">type</span> <code class="type"></code>cache_control</span> = <code class="type">[ `Max_age of int | `No_cache | `Unspecified ]</code> </pre>
305
372
<div class="info">
306
373
This is only a small subset of the HTTP 1.1 cache control
307
374
      features, but they are usually sufficient, and they work for
310
377
<ul>
311
378
<li><code class="code">`No_cache</code>: Caches are disabled.  The following headers are
312
379
      sent: <code class="code">Cache-control: no-cache</code>, <code class="code">Pragma: no-cache</code>, <code class="code">Expires:</code>
313
 
      (now - 1 second)</li>
 
380
      (now - 1 second). Note that many versions of Internet Explorer
 
381
      have problems to process non-cached contents when TLS/SSL is
 
382
      used to transfer the file. Use <code class="code">`Max_age</code> in such cases (see
 
383
      http://support.microsoft.com/kb/316431).</li>
314
384
</ul>
315
385
<ul>
316
386
<li><code class="code">`Max_age n</code>: Caches are allowed to store a copy of the
337
407
<br>
338
408
</div>
339
409
 
340
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi"></a><a href="Netcgi.cgi.html">cgi</a> = <code class="code">object</code> <a href="Netcgi.cgi.html">..</a> <code class="code">end</code></pre><div class="info">
 
410
<pre><span id="TYPEcgi"><span class="keyword">class type</span> <a href="Netcgi.cgi-c.html">cgi</a></span> = <code class="code">object</code> <a href="Netcgi.cgi-c.html">..</a> <code class="code">end</code></pre><div class="info">
341
411
Object symbolizing a CGI-like request/response cycle.
342
412
</div>
343
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi_activation"></a><a href="Netcgi.cgi_activation.html">cgi_activation</a> = <code class="type"><a href="Netcgi.cgi.html">cgi</a></code></pre><div class="info">
 
413
<pre><span id="TYPEcgi_activation"><span class="keyword">class type</span> <a href="Netcgi.cgi_activation-c.html">cgi_activation</a></span> = <code class="type"><a href="Netcgi.cgi-c.html">cgi</a></code></pre><div class="info">
344
414
Alternate, more descriptive name for <code class="code">cgi</code>
345
415
</div>
346
416
<br>
347
 
<a name="2_Connectors"></a>
348
 
<h2>Connectors</h2><br>
349
 
<pre><span class="keyword">type</span> <a name="TYPEoutput_type"></a><code class="type"></code>output_type = <code class="type">[ `Direct of string<br>       | `Transactional of<br>           <a href="Netcgi.html#TYPEconfig">config</a> -><br>           <a href="Netchannels.out_obj_channel.html">Netchannels.out_obj_channel</a> -> <a href="Netchannels.trans_out_obj_channel.html">Netchannels.trans_out_obj_channel</a> ]</code> </pre>
 
417
<span id="2_Connectors"><h2>Connectors</h2></span><br>
 
418
<pre><span id="TYPEoutput_type"><span class="keyword">type</span> <code class="type"></code>output_type</span> = <code class="type">[ `Direct of string<br>       | `Transactional of<br>           <a href="Netcgi.html#TYPEconfig">config</a> -><br>           <a href="Netchannels.out_obj_channel-c.html">Netchannels.out_obj_channel</a> -> <a href="Netchannels.trans_out_obj_channel-c.html">Netchannels.trans_out_obj_channel</a> ]</code> </pre>
350
419
<div class="info">
351
420
The ouput type determines how generated data is buffered.<ul>
352
421
<li><code class="code">`Direct sep</code>: Data written to the output channel of the
383
452
<br>
384
453
</div>
385
454
 
386
 
<pre><span class="keyword">type</span> <a name="TYPEarg_store"></a><code class="type"></code>arg_store = <code class="type"><a href="Netcgi.cgi_environment.html">cgi_environment</a> -><br>       string -><br>       <a href="Netmime.mime_header_ro.html">Netmime.mime_header_ro</a> -><br>       [ `Automatic<br>       | `Automatic_max of float<br>       | `Discard<br>       | `File<br>       | `File_max of float<br>       | `Memory<br>       | `Memory_max of float ]</code> </pre>
 
455
<pre><span id="VALbuffered_transactional_outtype"><span class="keyword">val</span> buffered_transactional_outtype</span> : <code class="type"><a href="Netcgi.html#TYPEoutput_type">output_type</a></code></pre><div class="info">
 
456
The <code class="code">output_type</code> implementing transactions with a RAM-based buffer<br>
 
457
</div>
 
458
<pre><span id="VALbuffered_transactional_optype"><span class="keyword">val</span> buffered_transactional_optype</span> : <code class="type"><a href="Netcgi.html#TYPEoutput_type">output_type</a></code></pre><div class="info">
 
459
<b>Deprecated</b> name for <code class="code">buffered_transactional_outtype</code><br>
 
460
</div>
 
461
<pre><span id="VALtempfile_transactional_outtype"><span class="keyword">val</span> tempfile_transactional_outtype</span> : <code class="type"><a href="Netcgi.html#TYPEoutput_type">output_type</a></code></pre><div class="info">
 
462
The <code class="code">output_type</code> implementing transactions with a tempfile-based
 
463
      buffer<br>
 
464
</div>
 
465
<pre><span id="VALtempfile_transactional_optype"><span class="keyword">val</span> tempfile_transactional_optype</span> : <code class="type"><a href="Netcgi.html#TYPEoutput_type">output_type</a></code></pre><div class="info">
 
466
<b>Deprecated</b> name for <code class="code">tempfile_transactional_outtype</code><br>
 
467
</div>
 
468
<pre><span id="TYPEarg_store"><span class="keyword">type</span> <code class="type"></code>arg_store</span> = <code class="type"><a href="Netcgi.cgi_environment-c.html">cgi_environment</a> -><br>       string -><br>       <a href="Netmime.mime_header_ro-c.html">Netmime.mime_header_ro</a> -><br>       [ `Automatic<br>       | `Automatic_max of float<br>       | `Discard<br>       | `File<br>       | `File_max of float<br>       | `Memory<br>       | `Memory_max of float ]</code> </pre>
387
469
<div class="info">
388
470
This is the type of functions <code class="code">arg_store</code> so that <code class="code">arg_store env
389
471
        name header</code> tells whether to <code class="code">`Discard</code> the argument or to
417
499
        the same as <code class="code">`Memory</code> (resp. <code class="code">`File</code>, resp. <code class="code">`Automatic</code>)
418
500
        except that the parameter indicates the maximum size in kB of
419
501
        the argument value.  If the size is bigger, the
420
 
        <a href="Netcgi.cgi_argument.html"><code class="code">Netcgi.cgi_argument</code></a> methods <code class="code">#value</code> and <code class="code">#open_value_rd</code>
 
502
        <a href="Netcgi.cgi_argument-c.html"><code class="code">Netcgi.cgi_argument</code></a> methods <code class="code">#value</code> and <code class="code">#open_value_rd</code>
421
503
        methods will raise <a href="Netcgi.Argument.html#EXCEPTIONOversized"><code class="code">Netcgi.Argument.Oversized</code></a>.
422
504
<p>
423
505
 
426
508
        limit on the size of the entire request.<br>
427
509
</div>
428
510
 
429
 
<pre><span class="keyword">type</span> <a name="TYPEexn_handler"></a><code class="type"></code>exn_handler = <code class="type"><a href="Netcgi.cgi_environment.html">cgi_environment</a> -> (unit -> unit) -> unit</code> </pre>
 
511
<pre><span id="TYPEexn_handler"><span class="keyword">type</span> <code class="type"></code>exn_handler</span> = <code class="type"><a href="Netcgi.cgi_environment-c.html">cgi_environment</a> -> (unit -> unit) -> unit</code> </pre>
430
512
<div class="info">
431
513
A function of type <code class="code">exn_handler</code> allows to define a custom
432
514
      handler of uncaught exceptions raised by the <code class="code">unit -&gt; unit</code>
443
525
      </code></pre><br>
444
526
</div>
445
527
 
446
 
<pre><span class="keyword">type</span> <a name="TYPEconnection_directive"></a><code class="type"></code>connection_directive = <code class="type">[ `Conn_close | `Conn_close_linger | `Conn_error of exn | `Conn_keep_alive ]</code> </pre>
 
528
<pre><span id="TYPEconnection_directive"><span class="keyword">type</span> <code class="type"></code>connection_directive</span> = <code class="type">[ `Conn_close | `Conn_close_linger | `Conn_error of exn | `Conn_keep_alive ]</code> </pre>
447
529
<div class="info">
448
530
Directive how to go on with the current connection:<ul>
449
531
<li><code class="code">`Conn_close</code>: Just shut down and close descriptor</li>