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