X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fgetter%2Fhttp_getter_common.ml;h=d56cf6909dcb6867bd576c60bddea372f414aea4;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=c85f680c28fa49fe7eb87aeb78eeacc90a5576bd;hpb=52fdcda3e0083391fa04a064f3e07279d975d5ba;p=helm.git diff --git a/helm/ocaml/getter/http_getter_common.ml b/helm/ocaml/getter/http_getter_common.ml index c85f680c2..d56cf6909 100644 --- a/helm/ocaml/getter/http_getter_common.ml +++ b/helm/ocaml/getter/http_getter_common.ml @@ -115,14 +115,14 @@ let return_file ~fname ?contype ?contenc ?patch_fun ?(gunzip = false) ?(via_http = true) ~enc outchan = - let headers = - match (contype, contenc) with - | (Some t, Some e) -> ["Content-Encoding", e; "Content-Type", t] - | (Some t, None) -> ["Content-Type" , t] - | (None, Some e) -> ["Content-Encoding", e] - | (None, None) -> [] - in if via_http then begin + let headers = + match (contype, contenc) with + | (Some t, Some e) -> ["Content-Encoding", e; "Content-Type", t] + | (Some t, None) -> ["Content-Type" , t] + | (None, Some e) -> ["Content-Encoding", e] + | (None, None) -> [] + in Http_daemon.send_basic_headers ~code:(`Code 200) outchan; Http_daemon.send_headers headers outchan; Http_daemon.send_CRLF outchan