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

« back to all changes in this revision

Viewing changes to doc/html-main/netcgi1/Netcgi_types.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:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html>
3
 
<head>
4
 
<link rel="stylesheet" href="style.css" type="text/css">
5
 
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
6
 
<link rel="Start" href="index.html">
7
 
<link rel="previous" href="Netcgi_env.html">
8
 
<link rel="next" href="Netcgi.html">
9
 
<link rel="Up" href="index.html">
10
 
<link title="Index of types" rel=Appendix href="index_types.html">
11
 
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
12
 
<link title="Index of values" rel=Appendix href="index_values.html">
13
 
<link title="Index of class methods" rel=Appendix href="index_methods.html">
14
 
<link title="Index of classes" rel=Appendix href="index_classes.html">
15
 
<link title="Index of class types" rel=Appendix href="index_class_types.html">
16
 
<link title="Index of modules" rel=Appendix href="index_modules.html">
17
 
<link title="Netcgi_env" rel="Chapter" href="Netcgi_env.html">
18
 
<link title="Netcgi_types" rel="Chapter" href="Netcgi_types.html">
19
 
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
20
 
<link title="Netcgi_jserv" rel="Chapter" href="Netcgi_jserv.html">
21
 
<link title="Netcgi_jserv_ajp12" rel="Chapter" href="Netcgi_jserv_ajp12.html">
22
 
<link title="Netcgi_jserv_app" rel="Chapter" href="Netcgi_jserv_app.html">
23
 
<link title="Netcgi_fcgi_10" rel="Chapter" href="Netcgi_fcgi_10.html">
24
 
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
25
 
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html"><title>Ocamlnet 2 Reference Manual (netcgi1 add-on) : Netcgi_types</title>
26
 
</head>
27
 
<body>
28
 
<div class="navbar"><a href="Netcgi_env.html">Previous</a>
29
 
&nbsp;<a href="index.html">Up</a>
30
 
&nbsp;<a href="Netcgi.html">Next</a>
31
 
</div>
32
 
<center><h1>Module <a href="type_Netcgi_types.html">Netcgi_types</a></h1></center>
33
 
<br>
34
 
<pre><span class="keyword">module</span> Netcgi_types: <code class="code">sig</code> <a href="Netcgi_types.html">..</a> <code class="code">end</code></pre>Basic types for CGI and related protocols<br>
35
 
<hr width="100%">
36
 
<pre><span class="keyword">exception</span> <a name="EXCEPTIONResources_exceeded"></a>Resources_exceeded</pre>
37
 
<div class="info">
38
 
Raised when the CGI input is longer than the configured maximum<br>
39
 
</div>
40
 
<pre><span class="keyword">class type</span> <a name="TYPEsimple_message"></a><a href="Netcgi_types.simple_message.html">simple_message</a> = <code class="type">Netmime.mime_body</code></pre><div class="info">
41
 
A <code class="code">simple_message</code> stores the value of the CGI argument as an
42
 
 unstructured string value.
43
 
</div>
44
 
<pre><span class="keyword">type</span> <a name="TYPEstore"></a><code class="type"></code>store = <code class="type">[ `File of string | `Memory ]</code> </pre>
45
 
<div class="info">
46
 
Determines where the data of the CGI argument are actually stored.<ul>
47
 
<li><code class="code">`Memory</code>: In an O'Caml string</li>
48
 
<li><code class="code">`File name</code>: In the file <code class="code">name</code>. The file contains the value of
49
 
   the argument after all transfer-related encodings have been
50
 
   removed (i.e. URL-encoding, and MIME transfer encodings).</li>
51
 
</ul>
52
 
<br>
53
 
</div>
54
 
 
55
 
<pre><span class="keyword">type</span> <a name="TYPErepresentation"></a><code class="type"></code>representation = <code class="type">[ `MIME of Netmime.mime_message | `Simple of <a href="Netcgi_types.simple_message.html">simple_message</a> ]</code> </pre>
56
 
<div class="info">
57
 
Representations of CGI arguments:<ul>
58
 
<li><code class="code">`Simple msg</code>: The argument is unstructured</li>
59
 
<li><code class="code">`MIME msg</code>: The argument has a MIME header in addition to the value</li>
60
 
</ul>
61
 
<br>
62
 
</div>
63
 
 
64
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi_argument"></a><a href="Netcgi_types.cgi_argument.html">cgi_argument</a> = <code class="code">object</code> <a href="Netcgi_types.cgi_argument.html">..</a> <code class="code">end</code></pre><div class="info">
65
 
The interface of CGI argument objects
66
 
</div>
67
 
<pre><span class="keyword">type</span> <a name="TYPEcgi_cookie"></a><code class="type"></code>cgi_cookie = <code class="type">Nethttp.cookie</code> = {</pre><table class="typetable">
68
 
<tr>
69
 
<td align="left" valign="top" >
70
 
<code>&nbsp;&nbsp;</code></td>
71
 
<td align="left" valign="top" >
72
 
<code>cookie_name&nbsp;: <code class="type">string</code>;</code></td>
73
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >The name of the cookie</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
74
 
</tr>
75
 
<tr>
76
 
<td align="left" valign="top" >
77
 
<code>&nbsp;&nbsp;</code></td>
78
 
<td align="left" valign="top" >
79
 
<code>cookie_value&nbsp;: <code class="type">string</code>;</code></td>
80
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >The value of the cookie. There are no restrictions on the
81
 
 value of the cookie</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
82
 
</tr>
83
 
<tr>
84
 
<td align="left" valign="top" >
85
 
<code>&nbsp;&nbsp;</code></td>
86
 
<td align="left" valign="top" >
87
 
<code>cookie_expires&nbsp;: <code class="type">float option</code>;</code></td>
88
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Expiration:<ul>
89
 
<li><code class="code">None</code>: the cookie expires when the browser session ends.</li>
90
 
<li><code class="code">Some t</code>: the cookie expires at the time <code class="code">t</code> (seconds since
91
 
    the epoch)</li>
92
 
</ul>
93
 
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
94
 
</tr>
95
 
<tr>
96
 
<td align="left" valign="top" >
97
 
<code>&nbsp;&nbsp;</code></td>
98
 
<td align="left" valign="top" >
99
 
<code>cookie_domain&nbsp;: <code class="type">string option</code>;</code></td>
100
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Cookies are bound to a certain domain, i.e. the browser sends
101
 
 them only when web pages of the domain are requested:
102
 
<p>
103
 
<ul>
104
 
<li><code class="code">None</code>: the domain is the hostname of the server</li>
105
 
<li><code class="code">Some domain</code>: the domain is <code class="code">domain</code></li>
106
 
</ul>
107
 
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
108
 
</tr>
109
 
<tr>
110
 
<td align="left" valign="top" >
111
 
<code>&nbsp;&nbsp;</code></td>
112
 
<td align="left" valign="top" >
113
 
<code>cookie_path&nbsp;: <code class="type">string option</code>;</code></td>
114
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Cookies are also bound to certain path prefixes, i.e. the browser
115
 
 sends them only when web pages at the path or below are requested.
116
 
<p>
117
 
<ul>
118
 
<li><code class="code">None</code>: the path is script name + path_info</li>
119
 
<li><code class="code">Some p</code>: the path is <code class="code">p</code>. With <code class="code">Some "/"</code> you can disable the
120
 
   path restriction completely.</li>
121
 
</ul>
122
 
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
123
 
</tr>
124
 
<tr>
125
 
<td align="left" valign="top" >
126
 
<code>&nbsp;&nbsp;</code></td>
127
 
<td align="left" valign="top" >
128
 
<code>cookie_secure&nbsp;: <code class="type">bool</code>;</code></td>
129
 
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Cookies are also bound to the type of the web server: 
130
 
 <code class="code">false</code> means servers without SSL, <code class="code">true</code> means servers with
131
 
 activated SSL ("https").</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
132
 
</tr></table>
133
 
}
134
 
 
135
 
 
136
 
<pre><span class="keyword">type</span> <a name="TYPEstatus"></a><code class="type"></code>status = <code class="type">Nethttp.http_status</code> </pre>
137
 
 
138
 
<pre><span class="keyword">type</span> <a name="TYPErequest_method"></a><code class="type"></code>request_method = <code class="type">[ `DELETE | `GET | `HEAD | `POST | `PUT of <a href="Netcgi_types.cgi_argument.html">cgi_argument</a> ]</code> </pre>
139
 
<div class="info">
140
 
The supported request methods:<ul>
141
 
<li><code class="code">`GET</code>: Side effect-free request of a web resource</li>
142
 
<li><code class="code">`POST</code>: Request with side effects</li>
143
 
<li><code class="code">`HEAD</code>: Only the header of the corresponding <code class="code">`GET</code> are requested</li>
144
 
<li><code class="code">`DELETE</code>: Request to delete the web resource</li>
145
 
<li><code class="code">`PUT arg</code>: Request to upload the web resource</li>
146
 
</ul>
147
 
<br>
148
 
</div>
149
 
 
150
 
<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>
151
 
<div class="info">
152
 
This is only a small subset of the HTTP 1.1 cache control features,
153
 
 but they are usually sufficient, and they work for HTTP/1.0 as well.
154
 
 The directives mean:<ul>
155
 
<li><code class="code">`No_cache</code>:
156
 
   Caches are disabled. The following headers are sent:
157
 
   <code class="code">Cache-control: no-cache</code>, <code class="code">Pragma: no-cache</code>, <code class="code">Expires:</code> (now - 1 second)</li>
158
 
<li><code class="code">`Max_age n</code>:
159
 
   Caches are allowed to store a copy of the response for <code class="code">n</code> seconds.
160
 
   After that, the response must be revalidated.
161
 
   <code class="code">Cache-control: max-age n</code>, <code class="code">Cache-control: must-revalidate</code>,
162
 
   <code class="code">Expires:</code> (now + <code class="code">n</code> seconds)</li>
163
 
<li><code class="code">`Unspecified</code>:
164
 
   No cache control header is added to the response.</li>
165
 
</ul>
166
 
 
167
 
 Notes:<ul>
168
 
<li>Cache control directives only apply to GET requests; POST requests
169
 
   are never cached</li>
170
 
<li>Not only proxies are considered as cache, but also the local disk
171
 
   cache of the browser</li>
172
 
<li>HTTP/1.0 did not specify cache behaviour as strictly as HTTP/1.1
173
 
   does. Because of this the <code class="code">Pragma</code> and <code class="code">Expires</code> headers are sent, too.
174
 
   These fields are not interpreted by HTTP/1.1 clients because 
175
 
   <code class="code">Cache-control</code> has higher precedence.</li>
176
 
</ul>
177
 
<br>
178
 
</div>
179
 
 
180
 
<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_types.cgi_argument.html">cgi_argument</a> list | `Current | `Initial | `None ]</code> </pre>
181
 
<div class="info">
182
 
Determines how the query part of URLs is generated:
183
 
<p>
184
 
<ul>
185
 
<li><code class="code">`Initial</code>: The query string is created from the initial
186
 
    CGI arguments</li>
187
 
<li><code class="code">`Current</code>: The query string is created from the current
188
 
    CGI arguments</li>
189
 
<li><code class="code">`Args l</code>: The query string is created from the specified argument list</li>
190
 
<li><code class="code">`None</code>: The query string is omitted</li>
191
 
</ul>
192
 
<br>
193
 
</div>
194
 
 
195
 
<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>
196
 
<div class="info">
197
 
Determines how an URL part is generated:
198
 
<p>
199
 
<ul>
200
 
<li><code class="code">`Env</code>: Take the value from the environment</li>
201
 
<li><code class="code">`This v</code>: Use this value <code class="code">v</code>. It must already be URL-encoded.</li>
202
 
<li><code class="code">`None</code>: Do not include this part into the URL</li>
203
 
</ul>
204
 
<br>
205
 
</div>
206
 
 
207
 
<pre><span class="keyword">class type</span> <a name="TYPEcgi_activation"></a><a href="Netcgi_types.cgi_activation.html">cgi_activation</a> = <code class="code">object</code> <a href="Netcgi_types.cgi_activation.html">..</a> <code class="code">end</code></pre><div class="info">
208
 
The common interface of CGI activation objects
209
 
</div>
210
 
</body></html>
 
 
b'\\ No newline at end of file'