You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.8 KiB
71 lines
2.8 KiB
Index: vcheck |
|
--- vcheck.orig 2002-03-01 10:14:08.000000000 +0100 |
|
+++ vcheck 2013-09-23 00:10:59.598226459 +0200 |
|
@@ -837,7 +837,7 @@ |
|
type => 'string', |
|
multiple => 1, |
|
trim => 1, |
|
- validate => sub { m#^(ftp|http)://.*?[^/]$#i ? 0 : 'Not an FTP or HTTP file URL' }, |
|
+ validate => sub { m#^(ftp|https?)://.*?[^/]$#i ? 0 : 'Not an FTP or HTTP/HTTPS file URL' }, |
|
help => 'explicit file URL to download from' |
|
}, |
|
dlintermediate => { |
|
@@ -901,7 +901,7 @@ |
|
required => 1, |
|
multiple => 1, |
|
trim => 1, |
|
- validate => sub { m#^(ftp|http)://#i ? 0 : 'Not an FTP or HTTP URL' }, |
|
+ validate => sub { m#^(ftp|https?)://#i ? 0 : 'Not an FTP or HTTP/HTTPS URL' }, |
|
help => 'URL of an HTML/FTP document or directory§B/§N' |
|
}, |
|
version => { |
|
@@ -1082,6 +1082,7 @@ |
|
my $ua = new LWP::UserAgent; |
|
$ua->agent("vcheck/$VERSION"); |
|
$ua->proxy('http', $opts{httpproxy}) if $opts{httpproxy}; |
|
+$ua->proxy('https', $opts{httpproxy}) if $opts{httpproxy}; |
|
$ua->proxy('ftp', $opts{ftpproxy}) if $opts{ftpproxy}; |
|
$ua->timeout($config{timeout} || $opts{timeout}); |
|
|
|
@@ -1245,9 +1246,9 @@ |
|
while (s#(?<!$fchar)$fchar*?($vre)$fchar*(?!$fchar)##) { |
|
my($s, $file, $url) = ($`, $&); |
|
next unless $file =~ /$re/; # make sure latest regex also matches |
|
- next if $dlurl =~ m#^http://#i && $s !~ /\bHREF\s*=\s*"?$/is; |
|
+ next if $dlurl =~ m#^https?://#i && $s !~ /\bHREF\s*=\s*"?$/is; |
|
if ($file =~ m#^([a-z]+)://#i) { # complete URL |
|
- $url = $file if $+ =~ /ftp|http/i |
|
+ $url = $file if $+ =~ /ftp|https?/i |
|
} elsif ($file =~ m#^/#) { # absolute path |
|
$dlurl =~ m#^\w+://[^/]+#; |
|
$url = "$&$file" |
|
@@ -1434,7 +1435,9 @@ |
|
|
|
sub read_url($;$$) # &read_url $url [$outfile [$referrer]] |
|
{ |
|
+ no warnings 'deprecated'; |
|
local($i, $t) = (1, time); |
|
+ local($isftp) = (@_->[0] =~ m|^ftp://|i); |
|
|
|
sub meter($$$) |
|
{ |
|
@@ -1460,7 +1463,9 @@ |
|
$xfersum += length $_; |
|
$_ |
|
} else { |
|
- local $_ = $ua->request($req); |
|
+ local $_; |
|
+ delete $ENV{FTP_PASSIVE}; $_ = $ua->request($req); |
|
+ $ENV{FTP_PASSIVE}=1; $_ = $ua->request($req) if ($isftp and $_->{_headers}->{content-length} == 0); |
|
$xfersum += length($_->headers) + length $_->content; |
|
$_->content |
|
} |
|
@@ -1830,7 +1835,7 @@ |
|
|
|
This option defines whether the script should look for and delete any obsolete |
|
versions of a program located in its download directory after each |
|
-§Usuccessful§N download of a new version of that program. A successful |
|
+successful download of a new version of that program. A successful |
|
download in this context is any download of a file of a known type whose |
|
integrity could be verified. Overrides B<config.deleteold>; the deletion of |
|
obsolete versions is disabled by default and only activated by
|
|
|