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

« back to all changes in this revision

Viewing changes to doc/html-main/Nethttpd_engine.http_request_header_notification-c.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="Nethttpd_engine.extended_async_environment-c.html">
 
8
<link rel="next" href="Nethttpd_engine.http_request_notification-c.html">
 
9
<link rel="Up" href="Nethttpd_engine.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 attributes" rel=Appendix href="index_attributes.html">
 
14
<link title="Index of class methods" rel=Appendix href="index_methods.html">
 
15
<link title="Index of classes" rel=Appendix href="index_classes.html">
 
16
<link title="Index of class types" rel=Appendix href="index_class_types.html">
 
17
<link title="Index of modules" rel=Appendix href="index_modules.html">
 
18
<link title="Index of module types" rel=Appendix href="index_module_types.html">
 
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">
 
23
<link title="Equeue" rel="Chapter" href="Equeue.html">
 
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">
 
28
<link title="Uq_engines" rel="Chapter" href="Uq_engines.html">
 
29
<link title="Uq_socks5" rel="Chapter" href="Uq_socks5.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">
 
33
<link title="Equeue_intro" rel="Chapter" href="Equeue_intro.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">
 
38
<link title="Netcgi_common" rel="Chapter" href="Netcgi_common.html">
 
39
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
 
40
<link title="Netcgi_ajp" rel="Chapter" href="Netcgi_ajp.html">
 
41
<link title="Netcgi_scgi" rel="Chapter" href="Netcgi_scgi.html">
 
42
<link title="Netcgi_cgi" rel="Chapter" href="Netcgi_cgi.html">
 
43
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
 
44
<link title="Netcgi_dbi" rel="Chapter" href="Netcgi_dbi.html">
 
45
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html">
 
46
<link title="Netcgi_test" rel="Chapter" href="Netcgi_test.html">
 
47
<link title="Netcgi_porting" rel="Chapter" href="Netcgi_porting.html">
 
48
<link title="Http_client_conncache" rel="Chapter" href="Http_client_conncache.html">
 
49
<link title="Http_client" rel="Chapter" href="Http_client.html">
 
50
<link title="Telnet_client" rel="Chapter" href="Telnet_client.html">
 
51
<link title="Ftp_data_endpoint" rel="Chapter" href="Ftp_data_endpoint.html">
 
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">
 
57
<link title="Nethttpd_types" rel="Chapter" href="Nethttpd_types.html">
 
58
<link title="Nethttpd_kernel" rel="Chapter" href="Nethttpd_kernel.html">
 
59
<link title="Nethttpd_reactor" rel="Chapter" href="Nethttpd_reactor.html">
 
60
<link title="Nethttpd_engine" rel="Chapter" href="Nethttpd_engine.html">
 
61
<link title="Nethttpd_services" rel="Chapter" href="Nethttpd_services.html">
 
62
<link title="Nethttpd_plex" rel="Chapter" href="Nethttpd_plex.html">
 
63
<link title="Nethttpd_util" rel="Chapter" href="Nethttpd_util.html">
 
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">
 
82
<link title="Netplex_types" rel="Chapter" href="Netplex_types.html">
 
83
<link title="Netplex_mp" rel="Chapter" href="Netplex_mp.html">
 
84
<link title="Netplex_mt" rel="Chapter" href="Netplex_mt.html">
 
85
<link title="Netplex_log" rel="Chapter" href="Netplex_log.html">
 
86
<link title="Netplex_controller" rel="Chapter" href="Netplex_controller.html">
 
87
<link title="Netplex_container" rel="Chapter" href="Netplex_container.html">
 
88
<link title="Netplex_sockserv" rel="Chapter" href="Netplex_sockserv.html">
 
89
<link title="Netplex_workload" rel="Chapter" href="Netplex_workload.html">
 
90
<link title="Netplex_main" rel="Chapter" href="Netplex_main.html">
 
91
<link title="Netplex_config" rel="Chapter" href="Netplex_config.html">
 
92
<link title="Netplex_kit" rel="Chapter" href="Netplex_kit.html">
 
93
<link title="Rpc_netplex" rel="Chapter" href="Rpc_netplex.html">
 
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">
 
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">
 
102
<link title="Netshm" rel="Chapter" href="Netshm.html">
 
103
<link title="Netshm_data" rel="Chapter" href="Netshm_data.html">
 
104
<link title="Netshm_hashtbl" rel="Chapter" href="Netshm_hashtbl.html">
 
105
<link title="Netshm_array" rel="Chapter" href="Netshm_array.html">
 
106
<link title="Netshm_intro" rel="Chapter" href="Netshm_intro.html">
 
107
<link title="Netconversion" rel="Chapter" href="Netconversion.html">
 
108
<link title="Netchannels" rel="Chapter" href="Netchannels.html">
 
109
<link title="Netstream" rel="Chapter" href="Netstream.html">
 
110
<link title="Mimestring" rel="Chapter" href="Mimestring.html">
 
111
<link title="Netmime" rel="Chapter" href="Netmime.html">
 
112
<link title="Netsendmail" rel="Chapter" href="Netsendmail.html">
 
113
<link title="Neturl" rel="Chapter" href="Neturl.html">
 
114
<link title="Netaddress" rel="Chapter" href="Netaddress.html">
 
115
<link title="Netbuffer" rel="Chapter" href="Netbuffer.html">
 
116
<link title="Netdate" rel="Chapter" href="Netdate.html">
 
117
<link title="Netencoding" rel="Chapter" href="Netencoding.html">
 
118
<link title="Netulex" rel="Chapter" href="Netulex.html">
 
119
<link title="Netaccel" rel="Chapter" href="Netaccel.html">
 
120
<link title="Netaccel_link" rel="Chapter" href="Netaccel_link.html">
 
121
<link title="Nethtml" rel="Chapter" href="Nethtml.html">
 
122
<link title="Netstring_str" rel="Chapter" href="Netstring_str.html">
 
123
<link title="Netstring_pcre" rel="Chapter" href="Netstring_pcre.html">
 
124
<link title="Netmappings" rel="Chapter" href="Netmappings.html">
 
125
<link title="Netaux" rel="Chapter" href="Netaux.html">
 
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">
 
137
<link title="Netchannels_tut" rel="Chapter" href="Netchannels_tut.html">
 
138
<link title="Netmime_tut" rel="Chapter" href="Netmime_tut.html">
 
139
<link title="Netsendmail_tut" rel="Chapter" href="Netsendmail_tut.html">
 
140
<link title="Netulex_tut" rel="Chapter" href="Netulex_tut.html">
 
141
<link title="Neturl_tut" rel="Chapter" href="Neturl_tut.html">
 
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">
 
159
<link title="Netpop" rel="Chapter" href="Netpop.html">
 
160
<link title="Rpc_auth_dh" rel="Chapter" href="Rpc_auth_dh.html">
 
161
<link title="Rpc_key_service" rel="Chapter" href="Rpc_key_service.html">
 
162
<link title="Rpc_time" rel="Chapter" href="Rpc_time.html">
 
163
<link title="Rpc_auth_local" rel="Chapter" href="Rpc_auth_local.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">
 
166
<link title="Rpc" rel="Chapter" href="Rpc.html">
 
167
<link title="Rpc_program" rel="Chapter" href="Rpc_program.html">
 
168
<link title="Rpc_util" rel="Chapter" href="Rpc_util.html">
 
169
<link title="Rpc_portmapper_aux" rel="Chapter" href="Rpc_portmapper_aux.html">
 
170
<link title="Rpc_packer" rel="Chapter" href="Rpc_packer.html">
 
171
<link title="Rpc_transport" rel="Chapter" href="Rpc_transport.html">
 
172
<link title="Rpc_client" rel="Chapter" href="Rpc_client.html">
 
173
<link title="Rpc_simple_client" rel="Chapter" href="Rpc_simple_client.html">
 
174
<link title="Rpc_portmapper_clnt" rel="Chapter" href="Rpc_portmapper_clnt.html">
 
175
<link title="Rpc_portmapper" rel="Chapter" href="Rpc_portmapper.html">
 
176
<link title="Rpc_server" rel="Chapter" href="Rpc_server.html">
 
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">
 
180
<link title="Rpc_intro" rel="Chapter" href="Rpc_intro.html">
 
181
<link title="Rpc_mapping_ref" rel="Chapter" href="Rpc_mapping_ref.html">
 
182
<link title="Rpc_intro_gss" rel="Chapter" href="Rpc_intro_gss.html">
 
183
<link title="Shell_sys" rel="Chapter" href="Shell_sys.html">
 
184
<link title="Shell" rel="Chapter" href="Shell.html">
 
185
<link title="Shell_uq" rel="Chapter" href="Shell_uq.html">
 
186
<link title="Shell_fs" rel="Chapter" href="Shell_fs.html">
 
187
<link title="Shell_intro" rel="Chapter" href="Shell_intro.html">
 
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"><title>Ocamlnet 3 Reference Manual : Nethttpd_engine.http_request_header_notification</title>
 
193
</head>
 
194
<body>
 
195
<div class="navbar"><a href="Nethttpd_engine.extended_async_environment-c.html">Previous</a>
 
196
&nbsp;<a href="Nethttpd_engine.html">Up</a>
 
197
&nbsp;<a href="Nethttpd_engine.http_request_notification-c.html">Next</a>
 
198
</div>
 
199
<center><h1>Class type <a href="type_Nethttpd_engine.http_request_header_notification.html">Nethttpd_engine.http_request_header_notification</a></h1></center>
 
200
<br>
 
201
<pre><span id="TYPEhttp_request_header_notification"><span class="keyword">class type</span> http_request_header_notification</span> = <code class="code">object</code> <a href="Nethttpd_engine.http_request_header_notification-c.html">..</a> <code class="code">end</code></pre><hr width="100%">
 
202
<span id="2_Notificationthatanewrequestheaderhasarrived"><h2>Notification that a new request header has arrived</h2></span>
 
203
<p>
 
204
 
 
205
 This object notifies the user that a new request header has arrived.
 
206
 The header is accessible by the <code class="code">environment</code> object. The channels
 
207
 also contained in this object are locked at this moment. The user must
 
208
 now either call <code class="code">schedule_accept_body</code> or <code class="code">schedule_reject_body</code>. The
 
209
 user will get a second notification (a <code class="code">http_request_notification</code>, below)
 
210
 when the request body has completely arrived (in case of acceptance), or
 
211
 immediately (in case of rejection). One can also call <code class="code">schedule_finish</code>
 
212
 at any time to drop the current request.<pre><span id="METHODreq_state"><span class="keyword">method</span> req_state</span> : <code class="type"><a href="Nethttpd_engine.html#TYPEengine_req_state">engine_req_state</a></code></pre><div class="info">
 
213
Returns the request processing state which is <code class="code">`Received_header</code> at the
 
214
 moment when this notification is delivered.<br>
 
215
</div>
 
216
<pre><span id="METHODenvironment"><span class="keyword">method</span> environment</span> : <code class="type"><a href="Nethttpd_engine.extended_async_environment-c.html">extended_async_environment</a></code></pre><div class="info">
 
217
The request environment. Depending on the request processing state, parts
 
218
 of the environment are already set up or still unaccessible ("locked").
 
219
 In the state <code class="code">`Received_header</code> only the request header and the 
 
220
 derived fields are accessible, and the input and output channels are
 
221
 locked. In the state <code class="code">`Receiving_body</code> the input channel is unlocked,
 
222
 but it is not yet filled (reading from it may cause the exception 
 
223
 <code class="code">Buffer_underrun</code>). The output channel remains locked.
 
224
 In the state <code class="code">`Received_request</code>, the input channel is unlocked and filled
 
225
 with data, and the output channel is unlocked, too.
 
226
<p>
 
227
 
 
228
 This environment is not fully CGI-compatible. In particular, the following
 
229
 differences exist:<ul>
 
230
<li>There is no <code class="code">cgi_path_info</code> and no <code class="code">cgi_path_translated</code>.</li>
 
231
<li>The user is always unauthenticated.</li>
 
232
<li>The <code class="code">Status</code> response header works as in CGI. The <code class="code">Location</code> header, however,
 
233
   must be a full URL when set (only browser redirects)</li>
 
234
<li>When the request body is transmitted by chunked encoding, the header
 
235
   <code class="code">Content-Length</code> is not set. In CGI this is interpreted as missing body.
 
236
   It is unlikely that clients send requests with chunked encoding, as this
 
237
   may cause interoperability problems anyway.
 
238
</li>
 
239
</ul>
 
240
<br>
 
241
</div>
 
242
<pre><span id="METHODschedule_accept_body"><span class="keyword">method</span> schedule_accept_body</span> : <code class="type">on_request:(<a href="Nethttpd_engine.http_request_notification-c.html">http_request_notification</a> -> unit) -><br>       ?on_error:(unit -> unit) -> unit -> unit</code></pre><div class="info">
 
243
Schedules that the request body is accepted. In terms of HTTP, this sends the
 
244
 "100 Continue" response when necessary. One can reply with a positive or
 
245
 negative message.
 
246
<p>
 
247
 
 
248
 This method returns immediately, and sets callbacks for certain events.
 
249
 When the body has completely arrived (or is empty), the function 
 
250
 <code class="code">on_request</code> is called back. The argument is the full request notification
 
251
 (see below).
 
252
<p>
 
253
 
 
254
 When the request is dropped for some reason, <code class="code">on_error</code> is called back instead.
 
255
 This can be used to free resources, for example.
 
256
<p>
 
257
 
 
258
 Neither of the callbacks must raise exceptions.<br>
 
259
</div>
 
260
<pre><span id="METHODschedule_reject_body"><span class="keyword">method</span> schedule_reject_body</span> : <code class="type">on_request:(<a href="Nethttpd_engine.http_request_notification-c.html">http_request_notification</a> -> unit) -><br>       ?on_error:(unit -> unit) -> unit -> unit</code></pre><div class="info">
 
261
Schedules that the request body is rejected. In terms of HTTP, this prevents
 
262
 sending the "100 Continue" response. Any arriving request body is silently
 
263
 discarded. One should immediately reply with an error mesage.
 
264
 negative message.
 
265
<p>
 
266
 
 
267
 This method returns immediately, and sets callbacks for certain events.
 
268
 When the body has completely arrived (or is empty), the function 
 
269
 <code class="code">on_request</code> is called back. The argument is the full request notification
 
270
 (see below).
 
271
<p>
 
272
 
 
273
 When the request is dropped for some reason, <code class="code">on_error</code> is called back instead.
 
274
 This can be used to free resources, for example.
 
275
<p>
 
276
 
 
277
 Neither of the callbacks must raise exceptions.<br>
 
278
</div>
 
279
<pre><span id="METHODschedule_finish"><span class="keyword">method</span> schedule_finish</span> : <code class="type">unit -> unit</code></pre><div class="info">
 
280
Schedules that the request is finished. This method should be called after
 
281
 the regular processing of the request to ensure that the HTTP protocol
 
282
 is fulfilled. If the request body has not been
 
283
 fully read, this is now done, and its data are dropped. If the response
 
284
 is incomplete, it is completed. If the error is not recoverable, a "Server
 
285
 Error" is generated.<br>
 
286
</div>
 
287
</body></html>
 
 
b'\\ No newline at end of file'