]> matita.cs.unibo.it Git - helm.git/commitdiff
get_and_save now handles big files properly (i.e. doesn't hold them
authorAndrea Asperti <andrea.asperti@unibo.it>
Wed, 13 Oct 2004 07:18:40 +0000 (07:18 +0000)
committerAndrea Asperti <andrea.asperti@unibo.it>
Wed, 13 Oct 2004 07:18:40 +0000 (07:18 +0000)
entirely in memory)

helm/ocaml/getter/.depend
helm/ocaml/getter/clientHTTP.ml

index 9b42378112a1079cdc3146a09f25f2fa3ee7cf28..295c638b9224318fca9827a6545d96b2ea41b48c 100644 (file)
@@ -14,10 +14,10 @@ http_getter_env.cmo: http_getter_const.cmi http_getter_logger.cmi \
     http_getter_misc.cmi http_getter_types.cmo http_getter_env.cmi 
 http_getter_env.cmx: http_getter_const.cmx http_getter_logger.cmx \
     http_getter_misc.cmx http_getter_types.cmx http_getter_env.cmi 
-http_getter_common.cmo: http_getter_env.cmi http_getter_logger.cmi \
-    http_getter_misc.cmi http_getter_types.cmo http_getter_common.cmi 
-http_getter_common.cmx: http_getter_env.cmx http_getter_logger.cmx \
-    http_getter_misc.cmx http_getter_types.cmx http_getter_common.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 \
+    http_getter_types.cmx http_getter_common.cmi 
 http_getter_map.cmo: http_getter_map.cmi 
 http_getter_map.cmx: http_getter_map.cmi 
 http_getter_cache.cmo: http_getter_common.cmi http_getter_env.cmi \
index 12641147f3f1cf88c2c9aa7e4a5d729a06023a3a..b4e0e26b67e65194375f02749e1aa2de074fad10 100644 (file)
@@ -40,10 +40,9 @@ let get uri =
 ;;
 
 let get_and_save uri dest_filename =
- let reply = get uri
- and out_channel = open_out dest_filename in
-  output_string out_channel reply ;
-  close_out out_channel
+ let out_channel = open_out dest_filename in
+ Http_user_agent.get_iter (output_string out_channel) uri;
+ close_out out_channel
 ;;
 
 let get_and_save_to_tmp uri =