X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fdaemons%2Fhttp_getter%2Fmain.ml;h=f708dc529f54f9f76564d55dcd031a5b7ebdc05e;hb=b0e53eab5aa92b80f4d13a638e6ca55c054be6e5;hp=c200c161dbe931a2a6c04f719dae3b12f1cab3fe;hpb=ee3f8d6fa92b051394a2ff7c71c03ac33a05182b;p=helm.git
diff --git a/helm/software/daemons/http_getter/main.ml b/helm/software/daemons/http_getter/main.ml
index c200c161d..f708dc529 100644
--- a/helm/software/daemons/http_getter/main.ml
+++ b/helm/software/daemons/http_getter/main.ml
@@ -147,7 +147,7 @@ let return_all_xml_uris fmt outchan =
| `Xml -> return_all_uris "alluris" uris outchan
let return_ls regexp fmt outchan =
- let ls_items = Http_getter.ls regexp in
+ let ls_items = Http_getter.ls ~local:false regexp in
let buf = Buffer.create 10240 in
(match fmt with
| `Text ->
@@ -194,7 +194,8 @@ let return_help outchan = return_html_raw (Http_getter.help ()) outchan
let return_resolve writable uri outchan =
try
return_xml_raw
- (sprintf "\n" (Http_getter.resolve ~writable uri))
+ (sprintf "\n"
+ (Http_getter.resolve ~writable ~local:false uri))
outchan
with
| Unresolvable_URI _ -> return_xml_raw "\n" outchan
@@ -273,7 +274,9 @@ let callback (req: Http_types.request) outchan =
let uri = req#param "uri" in
let fname = Http_getter.getxml uri in (* local name, in cache *)
(* remote name *)
- let remote_name = Http_getter.resolve ~writable:false uri in
+ let remote_name =
+ Http_getter.resolve ~writable:false ~local:false uri
+ in
let src_enc = if is_gzip fname then `Gzipped else `Normal in
let enc = parse_enc req in
let fname, cleanup = convert_file ~from_enc:src_enc ~to_enc:enc fname in
@@ -349,6 +352,7 @@ let main () =
let d_spec = Http_daemon.daemon_spec
~mode:`Thread ~timeout:(Some 600)
~port:(Lazy.force Http_getter_env.port)
+ ~auto_close:true
~callback:callback ()
in
try