Commit c9d28a35 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-11-10 13:06:17 by cvscast] Empty log message

Original author: cvscast
Date: 2002-11-10 13:08:21+00:00
parent 9ba27101
......@@ -6,12 +6,30 @@
open Netcgi
let operating_type = Netcgi.buffered_transactional_optype
let cgi = new Netcgi.std_activation ~operating_type ()
let fatal_error title s =
cgi # output # rollback_work();
cgi # set_header
~status:`Ok
~cache:`No_cache
();
cgi # output # output_string ("<h1>" ^ title ^ "</h1>");
cgi # output # output_string s;
cgi # output # commit_work();
cgi # finalize ();
exit 0
let () = fatal_error "Error" ""
(* Configuration *)
let session_dirs = [ "/home/frisch/sessions"; "/users/formel/cduce/sessions" ]
let session_dir =
try List.find Sys.file_exists session_dirs
with Not_found -> ""
with Not_found -> fatal_error "Internal error"
"Cannot find sessions directory"
let timeout = 60 * 5 (* seconds *)
let max_sess = 10
......@@ -186,8 +204,6 @@ let main (cgi : Netcgi.std_activation) =
cgi # output # commit_work()
let () =
let operating_type = Netcgi.buffered_transactional_optype in
let cgi = new Netcgi.std_activation ~operating_type () in
main cgi;
cgi # finalize ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment