]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/http_getter/http_getter_misc.ml
Initial revision
[helm.git] / helm / http_getter / http_getter_misc.ml
index 5cb713f206dbf6ad9ea868ac937822cfab7c3da5..4b82dd8e7e067f73deb2267e1bbbbf2e9ec15dcd 100644 (file)
@@ -93,7 +93,7 @@ let http_get_iter_buf ~callback url =
   let (address, port, path) = parse_url url in
   let buf = String.create tcp_bufsiz in
   let (inchan, outchan) = init_socket address port in
-  output_string outchan (sprintf "GET %s HTTP/1.0\r\n\r\n" path);
+  output_string outchan (sprintf "GET %s\r\n" path);
   flush outchan;
   (try
     while true do
@@ -110,6 +110,9 @@ let http_get_iter_buf ~callback url =
   close_in inchan (* close also outchan, same fd *)
 
 let wget ?output url =
+  debug_print
+    (sprintf "wgetting %s (output: %s)" url
+      (match output with None -> "default" | Some f -> f));
   match url with
   | url when Pcre.pmatch ~rex:file_scheme_RE url -> (* file:// *)
       (let src_fname = Pcre.replace ~rex:file_scheme_RE url in