head 1.2; access; symbols OPENPKG_E1_MP_HEAD:1.2 OPENPKG_E1_MP:1.2 OPENPKG_E1_MP_2_STABLE:1.2 OPENPKG_E1_FP:1.2 OPENPKG_2_STABLE_MP:1.2 OPENPKG_2_STABLE_20061018:1.2 OPENPKG_2_STABLE_20060622:1.2 OPENPKG_2_STABLE:1.2.0.6 OPENPKG_2_STABLE_BP:1.2 OPENPKG_2_5_RELEASE:1.2 OPENPKG_2_5_SOLID:1.2.0.4 OPENPKG_2_5_SOLID_BP:1.2 OPENPKG_2_4_SOLID:1.2.0.2; locks; strict; comment @# @; 1.2 date 2005.08.16.09.29.28; author rse; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2005.08.09.20.34.55; author thl; state Exp; branches; next ; 1.2.2.1 date 2005.08.16.09.31.13; author rse; state Exp; branches; next ; desc @@ 1.2 log @adjust to a more correct Perl syntax (it worked before because Perl is very forgiving and does a lot of guessing what is meant) @ text @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 } @ 1.2.2.1 log @MFC: Passive-FTP support @ text @@ 1.1 log @add vcheck feature: retry failed FTP URLs using passive mode @ text @d19 2 a20 2 + delete %ENV->{FTP_PASSIVE}; $_ = $ua->request($req); + $ENV{FTP_PASSIVE}=1; $_ = $ua->request($req) if($isftp and $_->{_headers}->{content-length} == 0); @