6 let env = cgi#environment
in
7 let cgi_arg name
= try Some
(cgi#argument name
)#
value with _
-> None
in
8 let outs = cgi#out_channel#output_string
in
9 let out fmt
= ksprintf
outs fmt
in
12 out "cgi_properties\n";
13 List.iter
(fun (k
,v
) -> out "%s = %s\n" k v
) env#cgi_properties
;
14 out "input_header_fields\n";
15 List.iter
(fun (k
,v
) -> out "%s = %s\n" k v
) env#input_header_fields
;
16 out "cgi_arguments\n";
17 List.iter
(fun x
-> out "%s = %s\n" x#name x#
value) cgi#arguments
20 cgi#set_header ~cache
:`No_cache ~content_type
:"text/plain" ();
28 cgi#out_channel#commit_work
();
30 _
-> cgi#out_channel#rollback_work
()