From e7e2a523299d807370b292b44e77f46fad1638c9 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Tue, 16 Dec 2003 17:00:48 +0000 Subject: [PATCH] removed dependency on netclient, use http_client module from ocaml-http --- helm/http_getter/.depend | 8 +++++++- helm/http_getter/Makefile | 4 ++-- helm/http_getter/http_getter_misc.ml | 7 +++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/helm/http_getter/.depend b/helm/http_getter/.depend index 1eb5ba8ce..9e048f6a9 100644 --- a/helm/http_getter/.depend +++ b/helm/http_getter/.depend @@ -1,3 +1,9 @@ +http_getter_cache.cmo: http_getter_common.cmi http_getter_debugger.cmi \ + http_getter_env.cmi http_getter_misc.cmi http_getter_types.cmo \ + threadSafe.cmi http_getter_cache.cmi +http_getter_cache.cmx: http_getter_common.cmx http_getter_debugger.cmx \ + http_getter_env.cmx http_getter_misc.cmx http_getter_types.cmx \ + threadSafe.cmx http_getter_cache.cmi http_getter_common.cmo: http_getter_env.cmi http_getter_misc.cmi \ http_getter_types.cmo http_getter_common.cmi http_getter_common.cmx: http_getter_env.cmx http_getter_misc.cmx \ @@ -17,7 +23,7 @@ http_getter_misc.cmx: http_getter_debugger.cmx zack.cmx http_getter_misc.cmi http_getter.cmo: http_getter_cache.cmi http_getter_common.cmi \ http_getter_const.cmi http_getter_debugger.cmi http_getter_env.cmi \ http_getter_map.cmi http_getter_misc.cmi http_getter_types.cmo -http_getter.cmx: http_getter_cache.cmi http_getter_common.cmx \ +http_getter.cmx: http_getter_cache.cmx http_getter_common.cmx \ http_getter_const.cmx http_getter_debugger.cmx http_getter_env.cmx \ http_getter_map.cmx http_getter_misc.cmx http_getter_types.cmx threadSafe.cmo: http_getter_debugger.cmi threadSafe.cmi diff --git a/helm/http_getter/Makefile b/helm/http_getter/Makefile index af2763b98..e6731ae03 100644 --- a/helm/http_getter/Makefile +++ b/helm/http_getter/Makefile @@ -1,11 +1,11 @@ -VERSION = 0.2.1 +VERSION = 0.2.2 NAME = http_getter DISTDIR = http-getter-$(VERSION) EXTRA_DIST = AUTHORS COPYING NEWS README BUGS DOCS = doc/http_getter.conf.xml.sample -REQUIRES = http dbm pcre netclient pxp shell threads zip +REQUIRES = http dbm pcre pxp shell threads zip COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o OCAMLFIND = ocamlfind OCAMLC = $(OCAMLFIND) ocamlc -thread $(COMMONOPTS) diff --git a/helm/http_getter/http_getter_misc.ml b/helm/http_getter/http_getter_misc.ml index 922edc560..a2685ca9a 100644 --- a/helm/http_getter/http_getter_misc.ml +++ b/helm/http_getter/http_getter_misc.ml @@ -227,8 +227,11 @@ let http_get url = with Unix.Unix_error (Unix.ENOENT, "stat", _) -> None end else (* other URL, pass it to netclient *) try - Some (Http_client.Convenience.http_get url) - with Http_client.Http_error (code, _) -> None + Some (Http_client.http_get url) + with e -> + prerr_endline (sprintf "Warning: Http_client failed with exception: %s" + (Printexc.to_string e)); + None (** apply a transformation "string list -> string list" to file lines *) let mangle_file ~fname f = -- 2.39.2