syslogger#log `Debug (sprintf "Parsing input document %s ..." xmluri);
let domImpl = Gdome.domImplementation () in
let input = domImpl#createDocumentFromURI ~uri:xmluri () in
+(*
+let _ = domImpl#saveDocumentToFile ~doc:input ~name:"/tmp/uwobo_doc.xml" () in
+let _ = let oc = open_out "/tmp/uwobo_uri.txt" in output_string oc xmluri; close_out oc in
+*)
syslogger#log `Debug "Applying stylesheet chain ...";
(try
let (write_result, media_type, encoding) = (* out_channel -> unit *)
(sprintf "Ignoring invalid interprocess command: '%s'" cmd))
done
with
- Restart_HTTP_daemon ->
+ | Restart_HTTP_daemon ->
close_in cmd_pipe; (* these calls close also fds *)
close_out res_pipe
+ | Sys.Break as exn -> raise exn
| e -> (* Should we return a 404 error here? Maybe... (how?) *)
output_string res_pipe (Printexc.to_string e);
close_in cmd_pipe; (* these calls close also fds *)