From f3f7262171c42f3396add139e9202411a1444559 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 21 Jan 2023 10:07:26 +0000 Subject: Fix curl options to allow it to follow HTTP redirections (mga#31339) 'curl -h' no longer outputs the full list of options, so the test for whether '--location-trusted' is supported always failed. As that option was added to curl in 2003, we can reasonably assume it is available. --- urpm/download.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'urpm') diff --git a/urpm/download.pm b/urpm/download.pm index 2d10f9ce..e09bb854 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -478,11 +478,6 @@ sub sync_curl { } } } - # Indicates whether this option is available in our curl - our $location_trusted; - if (!defined $location_trusted) { - $location_trusted = `/usr/bin/curl -h` =~ /location-trusted/ ? 1 : 0; - } #- http files (and other files) are correctly managed by curl wrt conditional download. #- options for ftp files, -R (-O )* #- options for http files, -R (-O )* @@ -500,7 +495,7 @@ sub sync_curl { ($options->{retry} ? ('--retry', $options->{retry}) : @{[]}), ($options->{quiet} ? "-s" : @{[]}), ($options->{"no-certificate-check"} ? "-k" : @{[]}), - $location_trusted ? "--location-trusted" : @{[]}, + "--location-trusted", "-R", "-f", "--disable-epsv", -- cgit v1.2.1