From ef85e9d48fe1285bf6415f56ae023deac3f0d3ce Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 15 Aug 2023 04:23:31 -0400 Subject: sbolint: handle URLs with % in them (derp). --- sbolint | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbolint b/sbolint index 1c40432..454e16b 100755 --- a/sbolint +++ b/sbolint @@ -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//; -- cgit v1.2.3