Re: Problems with FTP URL's

David A. Lee (dave@calldei.com)
Tue, 4 Jun 1996 16:30:00 -0700 (PDT)


I reported and fixed this bug with the following:

 
Line 839 in FTP.pm
   #DAL Was ...
   #my $lf = substr(${*$fd},-1,1) eq "\r" ? chop(${*$fd})
   #            : "";
 
   my $lf = (length ${*$fd} > 0 && substr(${*$fd},-1,1) eq "\r") ? chop(${*$fd})
                     : "";

I would really like to see this or an equivilent fix make it into
the distribution.


> 
> Some LWP-Net::FTP related questions. LWP-5.0, Net::FTP 1.18.
> 
> My Checkbot program has a bit of trouble with a number of FTP
> links. Checkbot will simply receive an error code 401 for these links,
> without any additional text.
> 
> Running HEAD manually on these links results in:
> 
> % HEAD ftp://kronto.cp.tn.tudelft.nl/pub/suriname/wapen.txt
> Enter username for FTP login at kronto.cp.tn.tudelft.nl: anonymous
> Password: 
> Unexpected EOF on command channel at /export/graaff/lib/perl5/site_perl/Net/FTP.pm line 750
> Use of uninitialized value at /export/graaff/lib/perl5/site_perl/LWP/Protocol/ftp.pm line 148, <STDIN> chunk 2.
> 200 OK
> Server: gaia FTP server/wu-2.4(1) Fri Apr 15 16:06:24 MET DST 1994
> Content-Length: 9912
> Content-Type: text/plain
> Client-Date: Tue, 04 Jun 1996 18:47:30 GMT
> 
> Using GET on the same URL works fine, and gives me the text. (I still
> have to enter a username, but I assume that's because I'm running HEAD
> interactively?)
> 
> 
> On other links I have another problem:
> 
> % HEAD ftp://ftp-au.lspace.org/Mirror/Pratchett/
> substr outside of string at /export/graaff/lib/perl5/site_perl/Net/FTP.pm line 839, <EXTERNAL> chunk 1.
> Use of uninitialized value at /export/graaff/lib/perl5/site_perl/Net/FTP.pm line 839, <EXTERNAL> chunk 1.
> 200 OK
> Server: schroeder FTP server/wu-2.4(1) Tue Feb 27 14:19:15 EST 1996
> Content-Length: 770
> Content-Type: text/ftp-dir-listing
> Client-Date: Tue, 04 Jun 1996 18:50:20 GMT
> 
> I also get the same warnings with GET, but I get the text just fine. 
> 
> I also noticed that for this FTP server I don't have to type a
> username. Could that still be the cause of the 401 error message?
> 
> I'll be happy to supply further details on this.
> 
> Hans
> -- 
> Hans de Graaff                              J.J.deGraaff@TWI.TUDelft.NL
> Delft University of Technology        Department of Information Systems
> ---- <a href="http://is.twi.tudelft.nl/~graaff/">Hans de Graaff</a> ---
>