1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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.mime_argument.html">
8
<link rel="next" href="Netcgi.custom_activation.html">
9
<link rel="Up" href="Netcgi.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.std_activation</title>
28
<div class="navbar"><a href="Netcgi.mime_argument.html">Previous</a>
29
<a href="Netcgi.html">Up</a>
30
<a href="Netcgi.custom_activation.html">Next</a>
32
<center><h1>Class <a href="type_Netcgi.std_activation.html">Netcgi.std_activation</a></h1></center>
34
<pre><span class="keyword">class</span> <a name="TYPEstd_activation"></a>std_activation : <code class="type">?env:<a href="Netcgi_env.cgi_environment.html">Netcgi_env.cgi_environment</a> -> ?processing:string -> Netmime.mime_header -> <a href="Netcgi.html#TYPEargument_processing">argument_processing</a> -> ?operating_type:<a href="Netcgi.html#TYPEoperating_type">operating_type</a> -> unit -> </code><code class="type"><a href="Netcgi_types.cgi_activation.html">Netcgi_types.cgi_activation</a></code></pre>This class is an implementation of classical CGI. When the object
35
is created, the CGI arguments are read from the input channel, and
36
it is arranged that the generated page is printed to the output channel.
37
If <code class="code">env</code> is
38
not explicitly passed, the <code class="code">stdin</code> descriptor is used as input,
39
and the <code class="code">stdout</code> descriptor is used as output channel (conforming
40
to the CGI standard); depending on the process environment variables,
41
either the real CGI connector is activated, or the class falls back
42
to a test mode where the user can interactively test the CGI
46
By passing <code class="code">env</code>, the class can be configured
47
differently, using other channels for I/O, or other sources for
48
the CGI environment variables.
51
The argument <code class="code">processing</code> determines how the CGI argument objects
52
are created (and where). The default is <code class="code">fun _ _ -> `Memory</code>.
55
The argument <code class="code">operating_type</code> determines whether an additional
56
transaction buffer is created. By default, no such buffer is
57
created (<code class="code">`Direct ""</code>).
61
<pre><code class="code"> let cgi = new std_activation() in
62
let foo_arg = cgi # argument_value "foo" in
63
cgi # set_header ~content_type:"text/plain"();
64
cgi # output # output_string ("foo = " ^ foo_arg);
65
cgi # commit_work(); (* implies "flush" *)
69
By default, the class only processes POST data encoded as
70
"application/x-www-form-urlencoded" and "multipart/form-data".
71
If the configuration of the environment permits it, data
72
of other types are accepted, too, and one argument "BODY"
73
is created containing the unparsed data.<br>
b'\\ No newline at end of file'