]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/http_getter_misc.ml
ported to ocaml-http 0.0.10 (renamed Http_client -> Http_user_agent)
[helm.git] / helm / ocaml / getter / http_getter_misc.ml
index 941efe25c497a8f7c72f52537bf9bc809d6c410c..ba7e7defa049a1a7911304b112520f5c4f692f98 100644 (file)
@@ -94,7 +94,7 @@ let wget ?output url =
       (let oc = 
         open_out (match output with Some f -> f | None -> Filename.basename url)
       in
-      Http_client.http_get_iter (fun data -> output_string oc data) url;
+      Http_user_agent.get_iter (fun data -> output_string oc data) url;
       close_out oc)
   | scheme -> (* unsupported scheme *)
       failwith ("Http_getter_misc.wget: unsupported scheme: " ^ scheme)
@@ -204,12 +204,12 @@ let http_get url =
       close_in ic;
       Some buf
     with Unix.Unix_error (Unix.ENOENT, "stat", _) -> None
-  end else  (* other URL, pass it to Http_client *)
+  end else  (* other URL, pass it to Http_user_agent *)
     try
-      Some (Http_client.http_get url)
+      Some (Http_user_agent.get url)
     with e ->
       Http_getter_logger.log (sprintf
-        "Warning: Http_client failed on url %s with exception: %s"
+        "Warning: Http_user_agent failed on url %s with exception: %s"
         url (Printexc.to_string e));
       None