diff options
-rwxr-xr-x | sbolint | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -516,7 +516,7 @@ sub dequote { sub logmsg { my $severity = shift; my $format = shift; - printf("$buildname: $severity: $format\n", @_); + print("$buildname: $severity: $format\n", @_); } sub log_error { @@ -1135,14 +1135,14 @@ sub check_url { } sub curl_head_request { - #return !system("curl --head --location --silent --fail $_[0] >/dev/null"); - #warn $_[1]; my $file = $_[0]; my $client_filename = $_[1]; $client_filename =~ s,.*/,,; - my $curlcmd = "curl -m20 --head --location --silent --fail $_[1]"; - open my $pipe, "$curlcmd|"; - #warn "$curlcmd"; + + my @curlcmd = qw/curl --max-time 20 --head --location --silent --fail/; + push @curlcmd, $_[1]; + open my $pipe, "-|", @curlcmd; + while(<$pipe>) { chomp; s/\r//; |