From owner-freebsd-perl@FreeBSD.ORG Wed May 19 19:09:34 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 94AAF106566B; Wed, 19 May 2010 19:09:34 +0000 (UTC) (envelope-from prvs=1748a0c3f5=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCD78FC1C; Wed, 19 May 2010 19:09:34 +0000 (UTC) Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 19 May 2010 12:54:33 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=zNANCjgXmV0A:10 a=VphdPIyG4kEA:10 a=ORa4HqFjfvEA:10 a=kj9zAlcOel0A:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=eNcD7ojaAAAA:8 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=W7W5ieEtIXCtpBIor4sA:9 a=JJgpRrh-ZMGwTnzM9-kA:7 a=nmo76z9ai8IMP7xlUOkI1fFITsUA:4 a=CjuIK1q_8ugA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=CtjVUDulFkf1vVCL:21 a=h0lqSEQlvwnB1VNA:21 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 19 May 2010 12:54:33 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 0394BC433AB_BF433E9B; Wed, 19 May 2010 18:54:32 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id A6979C460F5_BF433E6F; Wed, 19 May 2010 18:54:30 +0000 (GMT) Received: from localhost (brian@gw.lan.Awfulhak.org [172.16.0.1]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o4JIsU5x098475; Wed, 19 May 2010 11:54:30 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Wed, 19 May 2010 11:55:15 -0700 From: Brian Somers To: perl@FreeBSD.org Message-ID: <20100519115515.736c7478@Awfulhak.org> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: 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:09:34 -0000 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 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) {