[Melbourne-pm] LWP/https timeout issue

Paul Dwerryhouse paul at dwerryhouse.com.au
Mon Dec 29 16:34:57 PST 2008

Hi all,

I've run across a small issue when using LWP with https connections, in that
it completely ignores the 'timeout' parameter.

A quick way to demonstrate this is with the following example I've taken 
from a Redhat bug report (https://bugzilla.redhat.com/show_bug.cgi?id=460716):

If you run the this command to an IP address that doesn't exist, it
will timeout after one second, as requested:

lwp-request -uxS -t 1

However, if you change it so that it uses https instead, it ignores the
timeout parameter (and thus takes much longer to die):

lwp-request -uxS -t 1

The above bug report mentions a workaround that involves modifying
LWP/Protocol/http.pm and Net/HTTPS.pm - I've tested this, and it fixes it, but
I'd really prefer not to have this be a requirement for my code when it is
finished. Just wondering if anyone has hit this issue before, or if someone
could think of a way that I could work around this from my own code...

To complicate matters, I'm not calling LWP directly, but rather using it
via SOAP::Lite:

$soap_conn = SOAP::Lite
        ->proxy('https://localhost:81/blah',timeout => 5);

$response = $soap_conn->function(
	SOAP::Data->name('param' => 'whatever'))->result;



Paul Dwerryhouse				| PGP Key ID: 0x6B91B584

More information about the Melbourne-pm mailing list