diff options
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -208,9 +208,10 @@ sub sync_curl { local *CURL; my $options = shift @_; chdir(ref($options) ? $options->{dir} : $options); - my (@ftp_files, @other_files); + my (@ftp_files, @other_files, $use_https); foreach (@_) { /^ftp:\/\/.*\/([^\/]*)$/ && -s $1 > 8192 and do { push @ftp_files, $_; next }; #- manage time stamp for large file only. + $use_https ||= /^https:/; push @other_files, $_; } if (@ftp_files) { @@ -262,7 +263,8 @@ sub sync_curl { open CURL, join(" ", map { "'$_'" } "/usr/bin/curl", (ref($options) && $options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()), (ref($options) && $options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()), - (ref($options) && $options->{quiet} && !$options->{verbose} ? "-s" : @{[]}), "-R", "-f", "-k", "--stderr", "-", + (ref($options) && $options->{quiet} && !$options->{verbose} ? "-s" : @{[]}), + ($use_https ? "-k" : @{[]}), "-R", "-f", "--stderr", "-", @all_files) . " |"; local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). while (<CURL>) { |