Hi Monks!!
I would like implement a timeout on lwp using the https protocol, i know that's have a bug and not work at least on win, so i think in that:
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new( GET => "https://www.amazon.com" ); my $page = ""; eval {local $SIG{ALRM}=sub{die("timeout\n");}; alarm 40; my $res = $ua->request($req); if ($res->is_success) { $page = $res->content; } alarm 0; };
But not works too, What's the correct workaround to solve the timeout problem on https protocol?
Thk U
In reply to Workaround of Timeout on https by perlmonkdr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |