From 79722263df3193716bdbc37c35180c84e4027631 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 5 Sep 2005 10:26:09 +0000 Subject: [PATCH] bug fix for IDA: uses remote names (i.e. http://..) when patching xml bases so that external links like images gets valid URIs instead of invalid local ones like /tmp/... --- helm/http_getter/main.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/http_getter/main.ml b/helm/http_getter/main.ml index e4cae512c..3117a85c9 100644 --- a/helm/http_getter/main.ml +++ b/helm/http_getter/main.ml @@ -271,13 +271,16 @@ let callback (req: Http_types.request) outchan = | "/help" -> return_help outchan | "/getxml" -> let uri = req#param "uri" in - let fname = Http_getter.getxml uri in + let fname = Http_getter.getxml uri in (* local name, in cache *) + let remote_name = Http_getter.resolve uri in (* remote name *) 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 let contenc = if enc = `Gzipped then Some "x-gzip" else None in let patch_fun = - if parse_patch req then Some (patch_fun_for uri fname) else None + if parse_patch req + then Some (patch_fun_for uri remote_name) + else None in let gunzip = (enc = `Gzipped) in (try -- 2.39.2