]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/http_getter.ml
- changes defaults of getxml (format gzipped, don't patch dtd)
[helm.git] / helm / ocaml / getter / http_getter.ml
index 4f80006c6d80ebda60a6223b863c9d24a338baa7..e0a1a4658c500f3f74ed06820657138828cd3594 100644 (file)
@@ -291,11 +291,13 @@ let update_remote logger  () =
   logger `BR
 
 let getxml_remote ~format ~patch_dtd uri =
-  ClientHTTP.get_and_save_to_tmp
-    (sprintf "%sgetxml?uri=%s&format=%s&patch_dtd=%s"
+  let uri =
+    sprintf "%sgetxml?uri=%s&format=%s&patch_dtd=%s"
       (getter_url ()) uri
-      (match format with `Normal -> "normal" | `Gzipped -> "gzipped")
-      (match patch_dtd with true -> "yes" | false -> "no"))
+      (match format with `Normal -> "normal" | `Gzipped -> "gz")
+      (match patch_dtd with true -> "yes" | false -> "no")
+  in
+  ClientHTTP.get_and_save_to_tmp uri
 
 (* API *)
 
@@ -335,7 +337,7 @@ let update ?(logger = fun _ -> ()) () =
   else
     update_from_all_servers logger ()
 
-let getxml ?(format = `Normal) ?(patch_dtd = true) uri =
+let getxml ?(format = `Gzipped) ?(patch_dtd = false) uri =
   if remote () then
     getxml_remote ~format ~patch_dtd uri
   else begin