]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/clientHTTP.ml
get_and_save now handles big files properly (i.e. doesn't hold them
[helm.git] / helm / ocaml / getter / clientHTTP.ml
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 =