From: Stefano Zacchiroli Date: Tue, 12 Oct 2004 21:01:23 +0000 (+0000) Subject: ported to ocaml-http 0.0.10 (renamed Http_client -> Http_user_agent) X-Git-Tag: V_0_0_10~85 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=a524b2a00155ef09b11fcbf11fe08345e3ddab1a;p=helm.git ported to ocaml-http 0.0.10 (renamed Http_client -> Http_user_agent) --- diff --git a/helm/ocaml/getter/clientHTTP.ml b/helm/ocaml/getter/clientHTTP.ml index a7b36982c..12641147f 100644 --- a/helm/ocaml/getter/clientHTTP.ml +++ b/helm/ocaml/getter/clientHTTP.ml @@ -27,14 +27,14 @@ exception HttpClientError of string * string;; (* reason, uri *) let send cmd = try - ignore (Http_client.http_get cmd) + ignore (Http_user_agent.get cmd) with e -> raise (HttpClientError (Printexc.to_string e, cmd)) ;; let get uri = try - Http_client.http_get uri + Http_user_agent.get uri with e -> raise (HttpClientError (Printexc.to_string e, uri)) ;; diff --git a/helm/ocaml/getter/http_getter_misc.ml b/helm/ocaml/getter/http_getter_misc.ml index 941efe25c..ba7e7defa 100644 --- a/helm/ocaml/getter/http_getter_misc.ml +++ b/helm/ocaml/getter/http_getter_misc.ml @@ -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 diff --git a/helm/ocaml/pxp/pxpUrlResolver.ml b/helm/ocaml/pxp/pxpUrlResolver.ml index ec94b4e5e..81daaf739 100644 --- a/helm/ocaml/pxp/pxpUrlResolver.ml +++ b/helm/ocaml/pxp/pxpUrlResolver.ml @@ -28,14 +28,14 @@ exception HttpClientError of string * string;; (* reason, uri *) let send cmd = try - ignore (Http_client.http_get cmd) + ignore (Http_user_agent.get cmd) with e -> raise (HttpClientError (Printexc.to_string e, cmd)) ;; let get uri = try - Http_client.http_get uri + Http_user_agent.get uri with e -> raise (HttpClientError (Printexc.to_string e, uri)) ;;