← Back to team overview

pkg-perl-maintainers team mailing list archive

[Bug 1161640] [NEW] LWP::UserAgent hangs on SSL connections with keep-alive enabled

 

Public bug reported:

When using LWP::UserAgent on SSL connections with keep-alive enabled the
connection will hang or terminate with an error.  This bug was
introduced between 10.04 and 12.04.

The attached program ssl-keep-alive.pl run on 12.04 demonstrates the
problem.  An example run with keep-alive disabled produces the following
output (where the first argument is the URL and the second is 0 to
disable keep-alive or 1 to enable it):

$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 0
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 4 seconds)
starting GET ... done (elapsed time so far: 5 seconds)
starting GET ... done (elapsed time so far: 6 seconds)
starting GET ... done (elapsed time so far: 8 seconds)
$

Enabling keep-alive produces differing output:

$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
starting GET ... done (elapsed time so far: 17 seconds)
starting GET ...
500 Server closed connection without sending any data back
$

Using the latest Net::HTTP::Method module (version 6.06) fixes the
problem.  See https://rt.cpan.org/Public/Bug/Display.html?id=81237 for
details of this bug.  Upgrading package libnet-http-perl to the latest
upstream version 6.06 not only will fix this problem but also address
bug 1057609 (https://bugs.launchpad.net/ubuntu/+source/libnet-http-
perl/+bug/1057609).

** Affects: libnet-http-perl (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "ssl-keep-alive.pl"
   https://bugs.launchpad.net/bugs/1161640/+attachment/3604833/+files/ssl-keep-alive.pl

-- 
You received this bug notification because you are a member of Debian
Perl Group, which is subscribed to libnet-http-perl in Ubuntu.
https://bugs.launchpad.net/bugs/1161640

Title:
  LWP::UserAgent hangs on SSL connections with keep-alive enabled

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1161640/+subscriptions


Follow ups

References