* http://helm.cs.unibo.it/
*)
+(* $Id$ *)
+
open Http_getter_types;;
open Printf;;
sprintf "%s $1 SYSTEM \"%s/getdtd?uri=" kind
(Lazy.force Http_getter_env.my_own_url)
else
- sprintf "%s $1 SYSTEM \"file://%s/" kind
- (Lazy.force Http_getter_env.dtd_dir)
+ sprintf "%s $1 SYSTEM \"file://%s/" kind (Http_getter_env.get_dtd_dir ())
in
fun line -> Pcre.replace ~rex ~templ line
~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