LWP Dying on protocol violation

Bruce Johnson (bjohnson@mail.photonet.com)
Thu, 04 Nov 1999 16:00:55 -0500


I just got into a very simple application someone wrote using
LWP::Simple's mirror() function, and the very first problem I ran
into is this:

The client application calls mirror() to get a file from a remote
server, and the server (Netscape FastTrack 2.01) responds by
sending bogus header information.  It says the Content-Length is
6000-some characters, then sends the 130000-some characters that
are really in the file.  Mirror compares the two figures and
calls foul.  Rather than returning an error to the calling
routine, it does a die() with some verbiage announcing the
problem.

Since the sysadmin of the site isn't likely to listen to me and
Fix the Server, I am left with Coping with the Situation.

My first impulse is to modify mirror() and change it to somehow
return an error response code instead of dying.  Can anyone tell
me a good reason not to do this?
-- 
Bruce A. Johnson		PictureVision, Inc.
Sr. Software Engineer		250-A Exchange Pl.
(703)925-4075			Herndon, VA 20170
http://info.photonet.com