Problem With FTP
Rodney Wines (Rodney.Wines@ahqps.alcatel.fr)
Mon, 8 Mar 1999 19:29:35 +0100
Hello,
I have an application that downloads some files from an IBM host via FTP.
It's worked for over a year now, and survived a couple of Perl and lwp
upgrades. The URL (only munged slightly for security reasons) is:
ftp://netibm.alcatel.com/'TSO.A385.DOWNLOAD.DATA';type=a
However, I recently upgraded to perl5.005_02 and libwww-perl-5.41. I
installed the latest versions of all the dependent software, and the
installation went fine (on HP-UX 10.20), but my application has suddenly
stopped working. The message that's returned is:
500 Can't locate object method "path" via package "URI::_segment"
I added "use LWP::Debug qw(+);", and from the output I can tell that the
application logs on successfully. Then, I get:
LWP::Protocol::ftp::request: MDTM
LWP::Protocol::ftp::request: retrieve file?
LWP::UserAgent::request: Simple result: Internal Server Error
The application is very simple. It's just a hack of an example from lwpcook
at about version 5.9 or thereabouts. Here is the relevant code:
$ua = new LWP::UserAgent; #Create an agent.
$ua->agent("FTP Download " . $ua->agent); #Give it a name.
$req = new HTTP::Request 'GET' => $URL; #URL of file to get
$req->authorization_basic($username, $password);#Provide login
information.
$res = $ua->request($req, $temp_dest); #Send the request
$last_msg = $res->code . " " . $res->message;
print $last_msg, "\n"; #Prints the "500" message above.
If anyone can help, I would be grateful.
Thanks,
Rodney