open Http_getter_debugger;;
open Printf;;
+ (* constants *)
+
+let common_headers = [
+ "Cache-Control", "no-cache";
+ "Pragma", "no-cache";
+ "Expires", "0"
+]
+
(* HTTP queries argument parsing *)
let parse_enc (req: Http_types.request) =
*)
Http_daemon.send_basic_headers ~code:200 outchan;
Http_daemon.send_header "Content-Type" "text/xml" outchan;
+ Http_daemon.send_headers common_headers outchan;
Http_daemon.send_CRLF outchan;
output_string
outchan
objs "")
in
Http_daemon.respond
- ~headers:["Content-Type", "text/plain"] ~body outchan
+ ~headers:(("Content-Type", "text/plain") :: common_headers)
+ ~body outchan
| Fmt_xml ->
let body =
sprintf
objs ""))
in
Http_daemon.respond
- ~headers:["Content-Type", "text/xml"] ~body outchan
+ ~headers:(("Content-Type", "text/xml") :: common_headers)
+ ~body outchan
in
let (index_line_sep_RE, index_sep_RE, trailing_types_RE,
heading_cic_RE, heading_theory_RE,