Since that did, indeed, seem to be the problem, can anyone point me to 
where this needs to be corrected (aside from the crummy response the web 
server is giving out), so that LWP will handle this gracefully?

D


At 12:44 PM 4/12/00 -0700, Derek J. Balling wrote:
>Oh absolutely, HTTP is able to fetch fine (presuming that it is fetching 
>the same beast, I would suspect that it is).
>
>*grumble grumble*
>
>At 12:24 PM 4/12/00 -0700, Marvin Simkin wrote:
>>The image you are fetching consists of about 4 MB of nulls.
>>
>>I saw an older version of the https perl library (don't remember exactly
>>where, sorry) that had some trouble with nulls in a response. It was 
>>doing the
>>classic perl "if ($variable)" instead of "if (defined ($variable))" so it
>>would fail if $variable happened to be zero.
>>
>>Try it with http instead of https, if you can, and see if that isolates the
>>problem.
>>
>>
>>
>>
>>
>>From:   dballing%yahoo-inc.com@Internet on 2000-04-12 11:18 AM
>>To:     libwww%perl.org@Internet
>>cc:     (bcc: Marvin Simkin)
>>Subject:        LWP crashes consistently
>>
>>OK, I'm writing some code to scan our machines for the silly windows
>>"favicon.ico" file for IE bookmarking.
>>
>>CONSISTENTLY, I can scan through many many thousand machines until I get to
>>the request contained in the sample code below.
>>
>>At that point I get
>>
>>$perl foo2.pl
>>SET ALARM
>>ALARM!
>>perl in malloc(): warning: recursive call.
>>Out of memory!
>>perl in free(): warning: recursive call.
>>perl in free(): warning: recursive call.
>>perl in malloc(): warning: recursive call.
>>Out of memory!
>>perl in malloc(): warning: recursive call.
>>Out of memory!
>>perl in malloc(): warning: recursive call.
>>Out of memory!
>>perl in free(): warning: recursive call.
>>.... repeated several hundred times .....
>>perl in malloc(): warning: recursive call.
>>Out of memory!
>>$
>>
>>Something seriously foobar is happening when LWP tries to handle the
>>SIGALRM it looks like, and it seems to be consistently reproduceable on my
>>machine.  LWP version is 5.47, IO 1.20.... anything else, just ask, and I
>>shall document. :)
>>
>>Spent a day trying to track down where *I* was going runaway, only to find
>>it was in LWP. :(
>>
>>D
>>
>>
>>
>>----- code follows -----
>>
>>#!/usr/local/bin/perl
>>
>>require LWP;
>>require HTTP::Request;
>>require LWP::UserAgent;
>>
>>$| = 1;
>>
>>$url = 'https://store2.europe.yahoo.com/favicon.ico';
>>$hostname = 'store.europe.yahoo.com';
>>$AGENT_STR = "Mozilla/3.0 (Win98; I; Watchdog Script Browser Simulation)";
>>
>>$request = HTTP::Request->new (GET => $url);
>>$request->push_header("Host",$hostname);
>>
>>$SIG{'ALRM'} = sub { print "ALARM!\n"; die ("Timeout after 25 seconds"); };
>>
>>my $ua = new LWP::UserAgent;
>>
>>$ua -> use_eval(1);
>>$ua -> agent($AGENT_STR);
>>
>>alarm(25);
>>print "SET ALARM\n";
>>$response = $ua->request($request);
>>print "GOT RESPONSE\n";
>>alarm(0);
>>print "DONE\n";
>>
>>
>>-----------------------------------------------------------------------
>>Derek Balling                                              408-530-5062
>>Technical Yahoo                                          Do You Yahoo!?
>>
>>
>>
>
>
>-----------------------------------------------------------------------
>Derek Balling                                              408-530-5062
>Technical Yahoo                                          Do You Yahoo!?
>


-----------------------------------------------------------------------
Derek Balling                                              408-530-5062
Technical Yahoo                                          Do You Yahoo!?

Reply via email to