Re: Why does LWP freeze with this URL ?
bobmin@nidlink.com
Tue, 8 Aug 2000 02:36:04 -0700
On 8 Aug 2000, at 1:18, SeeItAllGuy@aol.com wrote:
>
> $req = HTTP::Request->new(GET => 'http://www.stinky.com/alex/resume.html');
> $req->header('Accept' => 'text/html');
>
> # send request
> $res = $ua->request($req);
>
According to both my browser, and a ping from our server, this
domain just doesn't exist. My first thought was to use NET::Ping to
test that the server exists before allowing the request, but there are
some web servers which do not allow themselves to be pinged.
One possible solution that might work for you, but it hasn't for me
(my modules might be out of date, so I need to consult with our
admin) is to add this line before your ua->request;
$timeout=$ua->timeout(30);
The value is the number, in seconds. Unset, this value is 180, or
three minutes. You see, you're not hanging up, your just waiting for
a response and will continue waiting until you time out.
Bob Minnick, Northern Webs
http://www.northernwebs.com