/usr/lib/ocaml/netcgi2-plex/netcgi_plex.mli is in libocamlnet-ocaml-dev 3.7.3-3build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | (* $Id: netcgi_plex.mli 1243 2009-05-25 23:45:36Z gerd $ *)
(** {1 Netplex support for FastCGI, SCGI and AJP connectors} *)
(** {2 Factory} *)
open Netcgi
val factory :
?config:config ->
?enable:[ `FCGI | `SCGI | `AJP ] list ->
?name:string ->
?output_type:output_type ->
?arg_store:arg_store ->
?exn_handler:exn_handler ->
?configure:(Netplex_types.config_file ->
Netplex_types.address ->
Netplex_types.processor_hooks) ->
(Netplex_types.container -> cgi -> unit) ->
Netplex_types.processor_factory
(** Reads a Netplex configuration section like
* {[
* processor {
* type = "netcgi"; (* or the overridden [name] *)
* timeout = 15; (* optional *)
* mount_dir = "/url/path"; (* optional *)
* mount_at = "/url/path"; (* optional alternative to mount_dir *)
* }
* ]}
*
* and creates a processor for the protocols "fcgi", "scgi",
* and "ajp" (or a subset of these protocols if the [enable]
* parameter restricts them). A complete service definition
* looks thus like:
*
* {[
* service {
* name = "name_of_service";
* protocol {
* name = "fcgi"; (* or "scgi" or "ajp" *)
* address {
* type = "internet";
* bind = "localhost:<port>";
* };
* };
* (* ... several protocol sections allowed! *)
* processor {
* type = "netcgi";
* };
* workload_manager {
* type = "dynamic";
* max_jobs_per_thread = 1; (* only reasonable value *)
* min_free_job_capacity = <n>;
* max_free_job_capacity = <n>;
* max_threads = <n>;
* };
* }
* ]}
*
* The processor calls the argument function of type [container -> cgi -> unit]
* for every incoming request.
*
* The [timeout] parameter specifies when inactive connections are
* timed out (in seconds). The [mount_dir] and [mount_at] parameters
* define which part of the URL is considered as [SCRIPT_NAME]:
*
* - By default (if neither [mount_dir] nor [mount_at]) are given
* [SCRIPT_NAME] is determined in a protocol-dependent way. Usually,
* the server transmits [SCRIPT_NAME], but see the note below.
* - If [mount_dir] is present, the processor accepts only URLs
* that have this path as true prefix directory, i.e. the URL path
* is [<mount_dir>/<name><rest>]. The part [<mount_dir>/<name>]
* is taken as [SCRIPT_NAME].
* - If [mount_at] is present, the processor accepts only URLs
* that have this path as prefix, i.e. the URL path is
* [<mount_at><rest>]. [<mount_at>] is taken as [SCRIPT_NAME].
*
* The background is that [SCRIPT_NAME] is commonly used to
* distinghuish between different web actions of the netcgi
* application. The actions are simply names in a directory like
* [/bin/<name>] or [/servlet/<name>]. Not all web servers/protocols
* transmit good values for [SCRIPT_NAME], however. By specifying
* [mount_dir] or [mount_at] one can force to interpret a certain
* prefix of the request URL as [SCRIPT_NAME].
*
* @param config The Netcgi configuration to use, default is
* {!Netcgi.default_config}
* @param enable Which protocols to support. Default is to
* support all protocols
* @param name Defines the name of the processor. Default is "netcgi".
* @param output_type Default: [`Direct ""]
* @param arg_store Default: [`Automatic] for all arguments.
* @param exn_handler See {!Netcgi.exn_handler}. Default: delegate
* all exceptions to the default handler.
* @param configure Parameters are the netplex configuration file
* and the address of the [processor] section. The configure
* function can look for additional parameters. It returns
* service hooks that are added to the resulting processor.
*)
(** {2 Processors} *)
(** The following functions create the processors directly *)
type mountpoint =
[ `Mount_dir of string
| `Mount_at of string
]
val fcgi_processor :
?config:config ->
?output_type:output_type ->
?arg_store:arg_store ->
?exn_handler:exn_handler ->
?timeout:float ->
?mount:mountpoint ->
(Netplex_types.container -> Netcgi_fcgi.cgi -> unit) ->
Netplex_types.processor
val scgi_processor :
?config:config ->
?output_type:output_type ->
?arg_store:arg_store ->
?exn_handler:exn_handler ->
?timeout:float ->
?mount:mountpoint ->
(Netplex_types.container -> cgi -> unit) ->
Netplex_types.processor
val ajp_processor :
?config:config ->
?output_type:output_type ->
?arg_store:arg_store ->
?exn_handler:exn_handler ->
?timeout:float ->
?mount:mountpoint ->
(Netplex_types.container -> cgi -> unit) ->
Netplex_types.processor
|