This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository liblwpx-paranoidagent-perl.

commit b2361cec4d9f8cb98a475bef0036386fd797711d
Author: Hilko Bengen <ben...@debian.org>
Date:   Thu Jun 19 17:27:53 2014 +0200

    Updated HTTPS patch (Closes: #738493)
    
    Verified using
    
        $ PERL_LWP_SSL_CA_PATH=/etc/ssl/certs perl -Ilib -MLWPx::ParanoidAgent 
-e 'print LWPx::ParanoidAgent->new->get("https://www.google.com";)->status_line'
---
 debian/patches/0001-Fix-HTTPS.patch | 44 +++++++++++++++++++++++++++----------
 1 file changed, 33 insertions(+), 11 deletions(-)

diff --git a/debian/patches/0001-Fix-HTTPS.patch 
b/debian/patches/0001-Fix-HTTPS.patch
index 307276c..83c6f18 100644
--- a/debian/patches/0001-Fix-HTTPS.patch
+++ b/debian/patches/0001-Fix-HTTPS.patch
@@ -5,30 +5,41 @@ Subject: Fix HTTPS
 - Revert upstream's decision to force Net::SSL over IO::Socket::SSL.
 - Pass hostname for verification. (This change has been accepted in
   upstream git)
+- Add patch from upstream git so EAGAIN is properly handled
 ---
- lib/LWPx/ParanoidAgent.pm          | 3 ---
- lib/LWPx/Protocol/http_paranoid.pm | 1 +
- 2 files changed, 1 insertion(+), 3 deletions(-)
+ lib/LWPx/ParanoidAgent.pm          | 4 ----
+ lib/LWPx/Protocol/http_paranoid.pm | 6 +++++-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/lib/LWPx/ParanoidAgent.pm b/lib/LWPx/ParanoidAgent.pm
-index 2e0feef..4d5cea2 100644
+index 2e0feef..1daebd7 100644
 --- a/lib/LWPx/ParanoidAgent.pm
 +++ b/lib/LWPx/ParanoidAgent.pm
-@@ -14,9 +14,6 @@ use Net::DNS;
+@@ -12,10 +12,6 @@ use HTTP::Status ();
+ use strict;
+ use Net::DNS;
  use LWP::Debug ();
- require Net::SSL;
- 
+-require Net::SSL;
+-
 -# fixes https://github.com/csirtgadgets/LWPx-ParanoidAgent/issues/4
 -$Net::HTTPS::SSL_SOCKET_CLASS = 'Net::SSL';
--
+ 
  sub new {
      my $class = shift;
-     my %opts = @_;
 diff --git a/lib/LWPx/Protocol/http_paranoid.pm 
b/lib/LWPx/Protocol/http_paranoid.pm
-index bb98526..76a058d 100644
+index bb98526..13d8504 100644
 --- a/lib/LWPx/Protocol/http_paranoid.pm
 +++ b/lib/LWPx/Protocol/http_paranoid.pm
-@@ -65,6 +65,7 @@ sub _new_socket
+@@ -10,6 +10,8 @@ require HTTP::Response;
+ require HTTP::Status;
+ require Net::HTTP;
+ 
++use Errno qw(EAGAIN);
++
+ use vars qw(@ISA $TOO_LATE $TIME_REMAIN);
+ 
+ require LWP::Protocol;
+@@ -65,6 +67,7 @@ sub _new_socket
              (time() - $request->{_timebegin}) :
              $timeout;
          $sock = $self->socket_class->new(PeerAddr => $addr,
@@ -36,3 +47,14 @@ index bb98526..76a058d 100644
                                           PeerPort => $port,
                                           Proto    => 'tcp',
                                           Timeout  => $conn_timeout,
+@@ -360,8 +363,9 @@ sub request
+       {
+             _set_time_remain();
+           $n = $socket->read_entity_body($buf, $size);
+-          die "Can't read entity body: $!" unless defined $n;
+           redo READ if $n == -1;
++          redo READ if not defined $n and $! == EAGAIN;
++          die "Can't read entity body: $!" unless defined $n;
+       }
+       $complete++ if !$n;
+         return \$buf;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/liblwpx-paranoidagent-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to