diff options
author | B. Watson <urchlay@slackware.uk> | 2023-08-15 04:23:31 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-08-15 04:23:31 -0400 |
commit | ef85e9d48fe1285bf6415f56ae023deac3f0d3ce (patch) | |
tree | e5ccbfc9f1ca91db6022a9a01e65276244de4714 | |
parent | ccb92ae029eefd964b4bbb29f93c0b90e6f6fb6b (diff) | |
download | sbo-maintainer-tools-ef85e9d48fe1285bf6415f56ae023deac3f0d3ce.tar.gz |
sbolint: handle URLs with % in them (derp).
-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//; |