1
(* $Id: netcgi_types.ml 1016 2006-10-02 13:58:45Z gerd $
2
* ----------------------------------------------------------------------
8
exception Resources_exceeded
10
class type simple_message = Netmime.mime_body
19
[ `Simple of simple_message
20
| `MIME of Netmime.mime_message
24
class type cgi_argument =
29
method open_value_rd : unit -> Netchannels.in_obj_channel
31
method content_type : string
32
method content_type_params : (string * Mimestring.s_param) list
33
method charset : string
34
method filename : string option
35
method representation : representation
36
method set_value : string -> unit
37
method open_value_wr : unit -> Netchannels.out_obj_channel
38
method finalize : unit -> unit
42
type cgi_cookie = Nethttp.cookie =
43
{ cookie_name : string;
44
cookie_value : string;
45
cookie_expires : float option;
46
cookie_domain : string option;
47
cookie_path : string option;
52
type status = http_status
59
| `PUT of cgi_argument
68
type query_string_spec =
69
[ `Initial | `Current | `Args of cgi_argument list | `None ]
72
[ `Env | `This of string | `None ]
74
class type cgi_activation =
76
method environment : Netcgi_env.cgi_environment
78
method request_method : request_method
80
method initial_arguments : (string * cgi_argument) list
81
method initial_argument : string -> cgi_argument
82
method initial_argument_value : ?default:string -> string -> string
83
method initial_multiple_argument : string -> cgi_argument list
85
method arguments : (string * cgi_argument) list
86
method argument : string -> cgi_argument
87
method argument_value : ?default:string -> string -> string
88
method multiple_argument : string -> cgi_argument list
90
method set_arguments : ?fin:bool -> cgi_argument list -> unit
91
method update_argument : ?fin:bool -> cgi_argument -> unit
92
method update_multiple_argument : ?fin:bool -> cgi_argument list -> unit
93
method delete_argument : ?fin:bool -> string -> unit
95
method url : ?protocol:Netcgi_env.protocol ->
96
?with_authority:other_url_spec ->
97
?with_script_name:other_url_spec ->
98
?with_path_info:other_url_spec ->
99
?with_query_string:query_string_spec ->
103
method output : Netchannels.trans_out_obj_channel
107
?content_type:string ->
108
?cache:cache_control ->
111
?script_type:string ->
112
?style_type:string ->
113
?set_cookie:cgi_cookie list ->
114
?fields:(string * string list) list ->
117
method set_redirection_header :
121
method finalize : unit -> unit