veillogger#clearMsgs;
let profile = try Some (req#param "profile") with _ -> None in
let password = try Some (req#param "password") with _ -> None in
veillogger#clearMsgs;
let profile = try Some (req#param "profile") with _ -> None in
let password = try Some (req#param "password") with _ -> None in
Http_daemon.send_basic_headers ~code:(`Code 200) outchan;
Http_daemon.send_header "Content-Type" content_type outchan;
Http_daemon.send_CRLF outchan;
Http_daemon.send_basic_headers ~code:(`Code 200) outchan;
Http_daemon.send_header "Content-Type" content_type outchan;
Http_daemon.send_CRLF outchan;
debug_print (sprintf "Starting HTTP daemon on port %d ..." port);
(* next invocation doesn't return, process will keep on serving HTTP
requests until it will get killed by father *)
debug_print (sprintf "Starting HTTP daemon on port %d ..." port);
(* next invocation doesn't return, process will keep on serving HTTP
requests until it will get killed by father *)
- Http_daemon.start'~port ~mode:`Fork
- (callback ~syslogger ~styles ~cmd_pipe ~res_pipe ())
+ let d_spec = Http_daemon.daemon_spec
+ ~port ~mode:`Fork
+ ~callback:(callback ~syslogger ~styles ~cmd_pipe ~res_pipe ())
+ ~auto_close:true ()
+ in
+ Http_daemon.main d_spec