summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-13 09:21:52 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-13 09:21:52 +0000
commita88bc6e5fa70eca4f81b6c487a3696e2f4789f48 (patch)
treecd584724c782e2945dac2cc10fa4c58683a603d4 /urpm.pm
parent93b7bd0da72597db73c92db0ed1e50e0ed907c40 (diff)
downloadurpmi-a88bc6e5fa70eca4f81b6c487a3696e2f4789f48.tar
urpmi-a88bc6e5fa70eca4f81b6c487a3696e2f4789f48.tar.gz
urpmi-a88bc6e5fa70eca4f81b6c487a3696e2f4789f48.tar.bz2
urpmi-a88bc6e5fa70eca4f81b6c487a3696e2f4789f48.tar.xz
urpmi-a88bc6e5fa70eca4f81b6c487a3696e2f4789f48.zip
4.1-33mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index de2470d7..f9198635 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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>) {