- Http_daemon.respond_file (sprintf "") outchan
- | _ ->
- Http_daemon.respond_error
- ~status:(`Server_error `Internal_server_error) outchan)
+ debug_print "HTML successfully generated";
+ Http_daemon.respond_file (sprintf "prova.%d.html" pid) outchan
+ | status ->
+ debug_print "Failure, sending error message";
+ let res =
+ new Http_response.response
+ ~body:
+ (errmsg ("Exit status: " ^ (string_of_exit_status status)))
+ ()
+ in
+ Http_daemon.respond_with res outchan)