| 3 |
|
|
| 4 |
let main (cgi : Netcgi.std_activation) = |
let main (cgi : Netcgi.std_activation) = |
| 5 |
try |
try |
| 6 |
cgi # set_header (); |
cgi # set_header |
| 7 |
|
~content_type:"text/html; charset=\"iso-8859-1\"" |
| 8 |
|
(); |
| 9 |
let src = cgi # argument_value "prog" in |
let src = cgi # argument_value "prog" in |
| 10 |
|
|
| 11 |
let ppf = Format.str_formatter |
let ppf = Format.str_formatter |
| 37 |
with |
with |
| 38 |
exn -> |
exn -> |
| 39 |
cgi # output # rollback_work(); |
cgi # output # rollback_work(); |
| 40 |
cgi # set_header ~status:`Internal_server_error (); |
cgi # set_header |
| 41 |
|
~status:`Internal_server_error |
| 42 |
|
~cache:`No_cache |
| 43 |
|
(); |
| 44 |
cgi # output # output_string "<h1>Internal software error!</h1>"; |
cgi # output # output_string "<h1>Internal software error!</h1>"; |
| 45 |
cgi # output # output_string (Printexc.to_string exn); |
cgi # output # output_string (Printexc.to_string exn); |
| 46 |
cgi # output # commit_work() |
cgi # output # commit_work() |