OK, I have this code:
where $url = "https://some-server-name.domain.com/favicon.ico";
$hostname = "some-a-rotation.domain.com"
(so for example "some-server-name" might be "www2.yahoo.com", and hostname
might be "www.yahoo.com" (to create support for HTTP/1.1 virtualhosting).
my $request = HTTP::Request->new (GET => $url);
$request->push_header("Host",$hostname);
my $ua = new LWP::UserAgent;
$ua -> timeout(20);
$ua -> agent($AGENT_STR);
$response = $ua->request($request)
Can anyone tell me.... why does this NOT die after 20 seconds? It DOES
eventually time out (at least, occasionally, it seems to, although it takes
a LONG time... several minutes, and not just the "three minute" default,
I've had one sitting there for about 15 minutes now).
I even went so desperate as to do:
$SIG{'ALRM'} = sub {die ("timeout"); };
eval
{
alarm(25);
my $ua = new LWP::UserAgent;
$ua -> timeout(20);
$ua -> agent($AGENT_STR);
$response = $ua->request($request);
};
But no luck, so SOMETHING is stealing the alarm timer... any ideas?
D
-----------------------------------------------------------------------
Derek Balling 408-530-5062
Technical Yahoo Do You Yahoo!?