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.
23 lines
684 B
23 lines
684 B
Feature: retry failed FTP URLs using passive mode |
|
|
|
--- vcheck.orig 2005-03-20 20:05:19 +0100 |
|
+++ vcheck 2005-08-09 18:05:06 +0200 |
|
@@ -1435,6 +1436,7 @@ |
|
sub read_url($;$$) # &read_url $url [$outfile [$referrer]] |
|
{ |
|
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 |
|
}
|
|
|