develooper Front page | perl.perl5.porters | Postings from July 2019

Re: "Damaged tar archive" for perl-5.32.2 on ftp callsfromCPANmirrors

Thread Previous | Thread Next
From:
sisyphus
Date:
July 25, 2019 15:49
Subject:
Re: "Damaged tar archive" for perl-5.32.2 on ftp callsfromCPANmirrors
Message ID:
CADZSBj3xnJguxejufN1fC7YAj-7=J8W_xS_e8VJ1R+FPR7kzUw@mail.gmail.com
On Fri, Jul 26, 2019 at 12:24 AM Niko Tyni <ntyni@debian.org> wrote

> Looks like you're setting binary mode too early and you need to login
first.

Well spotted - moving the switch to binary mode to just prior to the get()
call fixes the issue.
With ftp.pl in its original form, I always saw output of:
150 Opening BINARY mode data connection for perl-5.31.1.tar.gz (17593158
bytes)
and thought that meant that I was, in fact, downloading in binary mode.
Apparently that's not correct. What does that output actually tell me ?

The next question is "Is it fair enough that the mirrors.rit.edu server
requires this of my script ?"
Since binary() is a method that's called on the Net::FTP object I would
have expected that calling $ftp->binary() could be done at any time after
initialization of $ftp.
Also, note that the ftp.funet.fi server has no such requirement. The script
output reveals that on the ftp.funet.fi server the switch to binary mode is
made *after* the login, even though the script calls the binary method
*before* the login.

Cheers,
Rob

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About