Subject: | t/08_http.t - check proxy |
t/08_http.t doesn't verify that the proxy code works. It should
be easy to test by looking in the environment to see if http_proxy is
set, say:
my $proxysite;
my $proxyport;
my @envproxy;
if($ENV{'http_proxy'}) {
@envproxy = split(/:/, $ENV{'http_proxy'});
$proxysite = $envproxy[1];
$proxysite =~ s/\///g;
$proxyport = $envproxy[2];
Then you could put something like this into a context call for a new test:
IO::Lambda::context(
'http://www.example.com',
keep_alive => 1,
async_dns => 1,
proxy => $proxysite, $proxyport,
timeout => 10
);
}