From owner-freebsd-perl@FreeBSD.ORG Wed May 19 19:23:55 2010 Return-Path: Delivered-To: perl@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F1761065670 for ; Wed, 19 May 2010 19:23:55 +0000 (UTC) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [194.255.56.42]) by mx1.freebsd.org (Postfix) with ESMTP id 135558FC14 for ; Wed, 19 May 2010 19:23:54 +0000 (UTC) Received: by heechee.tobez.org (Postfix, from userid 1001) id 17C756D400; Wed, 19 May 2010 21:23:54 +0200 (CEST) Date: Wed, 19 May 2010 21:23:54 +0200 From: Anton Berezin To: Brian Somers Message-ID: <20100519192354.GB30998@heechee.tobez.org> References: <20100519115515.736c7478@Awfulhak.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100519115515.736c7478@Awfulhak.org> X-Powered-By: FreeBSD http://www.freebsd.org/ User-Agent: Mutt/1.5.20 (2009-06-14) Cc: perl@FreeBSD.org Subject: Re: p5-Crypt-SSLeay patch X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 19:23:55 -0000 On Wed, May 19, 2010 at 11:55:15AM -0700, Brian Somers wrote: > Hi, > > Is it ok to submit this patch to the Crypt-SSLeay port? I've submitted > it to the maintainer, but as the bug has been known about for some time > and no release of Crypt-SSLeay has been done recently, I figured that > waiting for a release is not wise. > > The bug report is here: > > https://rt.cpan.org/Public/Bug/Display.html?id=33954 > > The patch is below. > > Thanks. Thanks Brian. Committed. > > -- > Brian Somers > Don't _EVER_ lose your sense of humour ! > > --- lib/Net/SSL.pm.orig 2007-09-17 12:56:52.000000000 -0700 > +++ lib/Net/SSL.pm 2010-05-19 11:23:50.000000000 -0700 > @@ -361,8 +361,15 @@ > > $connect_string .= $CRLF; > $self->SUPER::send($connect_string); > - my $header; > - my $n = $self->SUPER::sysread($header, 8192); > + my $header = ""; > + my $timeout; > + while ($header !~ m{HTTP/\d+\.\d+\s+200\s+.*\r\n\r\n}s) { > + $timeout = $self->timeout(5) unless length $header; > + my $n = $self->SUPER::sysread($header, 8192, length $header); > + last if $n <= 0; > + } > + $self->timeout($timeout) if defined $timeout; > + > my $conn_ok = ($header =~ /HTTP\/\d+\.\d+\s+200\s+/is) ? 1 : 0; > > if (not $conn_ok) { > _______________________________________________ > freebsd-perl@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-perl > To unsubscribe, send any mail to "freebsd-perl-unsubscribe@freebsd.org" -- Our society can survive even a large amount of irrational regulation. -- John McCarthy