Handle IO::Socket::SSL as non-blocking
This commit is contained in:
parent
02da24ceaf
commit
961ceee0e4
@ -0,0 +1,25 @@
|
||||
From 744fb936829d27c7bf0d95167aa5d89c9afd5dc9 Mon Sep 17 00:00:00 2001
|
||||
From: Jesse Luehrs <doy@tozt.net>
|
||||
Date: Wed, 2 Jan 2013 21:38:25 -0600
|
||||
Subject: [PATCH] IO::Socket::SSL doesn't play well with select()
|
||||
|
||||
This should fix RT#81237, although I'm not sure if it re-breaks RT#72676 (I'm not sure what to do to test it).
|
||||
---
|
||||
lib/Net/HTTP/Methods.pm | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/Net/HTTP/Methods.pm b/lib/Net/HTTP/Methods.pm
|
||||
index 77e3038..378dad4 100644
|
||||
--- a/lib/Net/HTTP/Methods.pm
|
||||
+++ b/lib/Net/HTTP/Methods.pm
|
||||
@@ -283,6 +283,7 @@ sub my_readline {
|
||||
sub can_read {
|
||||
my $self = shift;
|
||||
return 1 unless defined(fileno($self));
|
||||
+ return 1 if $self->isa('IO::Socket::SSL') && $self->pending;
|
||||
|
||||
# With no timeout, wait forever. An explict timeout of 0 can be
|
||||
# used to just check if the socket is readable without waiting.
|
||||
--
|
||||
1.8.1.4
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
Name: perl-Net-HTTP
|
||||
Version: 6.05
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Low-level HTTP connection (client)
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/Net-HTTP/
|
||||
Source0: http://www.cpan.org/authors/id/G/GA/GAAS/Net-HTTP-%{version}.tar.gz
|
||||
# Do not block with IO::Socket::SSL, rhbz#768394, CPAN RT#81237
|
||||
Patch0: Net-HTTP-6.05-IO-Socket-SSL-doesn-t-play-well-with-select.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(Getopt::Long)
|
||||
# Run-time:
|
||||
@ -22,7 +25,7 @@ BuildRequires: perl(Data::Dumper)
|
||||
BuildRequires: perl(Socket)
|
||||
BuildRequires: perl(Test)
|
||||
BuildRequires: perl(Test::More)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(Compress::Raw::Zlib)
|
||||
Requires: perl(IO::Uncompress::Gunzip)
|
||||
Requires: perl(IO::Select)
|
||||
@ -40,15 +43,15 @@ and HTTP/1.1.
|
||||
|
||||
%prep
|
||||
%setup -q -n Net-HTTP-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
||||
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
|
||||
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
@ -60,6 +63,9 @@ make test
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Fri Mar 08 2013 Petr Pisar <ppisar@redhat.com> - 6.05-3
|
||||
- Handle IO::Socket::SSL as non-blocking (bug #768394)
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.05-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user