]> matita.cs.unibo.it Git - helm.git/commitdiff
bug fix for IDA: uses remote names (i.e. http://..) when patching xml bases so that...
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 5 Sep 2005 10:26:09 +0000 (10:26 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 5 Sep 2005 10:26:09 +0000 (10:26 +0000)
helm/http_getter/main.ml

index e4cae512c8df2a810e357f68db6842b5e6f86601..3117a85c991eed1be6c3cf81d14d2048cfe45683 100644 (file)
@@ -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