X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter.ml;h=982544bce69e606545660e839f7d539b471fb7ac;hb=1e34c17c30ee6c992f3759bd0f0d5012e6803092;hp=1e04ae8789ac06bab757c1b45398d7947cc2a3c3;hpb=2e41357d3d5cca73b3f91e83528d3758ca3e62db;p=helm.git diff --git a/helm/http_getter/http_getter.ml b/helm/http_getter/http_getter.ml index 1e04ae878..982544bce 100644 --- a/helm/http_getter/http_getter.ml +++ b/helm/http_getter/http_getter.ml @@ -30,6 +30,14 @@ open Http_getter_types;; 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) = @@ -88,6 +96,7 @@ let return_all_foo_uris map doctype filter outchan = *) 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 @@ -181,7 +190,8 @@ let return_ls = 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 @@ -214,7 +224,8 @@ let return_ls = 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,