Date: Wed, 19 May 2010 11:55:15 -0700 From: Brian Somers <brian@FreeBSD.org> To: perl@FreeBSD.org Subject: p5-Crypt-SSLeay patch Message-ID: <20100519115515.736c7478@Awfulhak.org>
next in thread | raw e-mail | index | archive | help
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. -- 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100519115515.736c7478>