Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2010 21:23:54 +0200
From:      Anton Berezin <tobez@tobez.org>
To:        Brian Somers <brian@FreeBSD.org>
Cc:        perl@FreeBSD.org
Subject:   Re: p5-Crypt-SSLeay patch
Message-ID:  <20100519192354.GB30998@heechee.tobez.org>
In-Reply-To: <20100519115515.736c7478@Awfulhak.org>
References:  <20100519115515.736c7478@Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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                                       <brian@Awfulhak.org>
> Don't _EVER_ lose your sense of humour !            <brian@FreeBSD.org>
> 
> --- 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100519192354.GB30998>