Return-Path: X-Original-To: apmail-perl-dev-archive@www.apache.org Delivered-To: apmail-perl-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48A131007A for ; Fri, 21 Jun 2013 06:49:51 +0000 (UTC) Received: (qmail 35504 invoked by uid 500); 21 Jun 2013 06:49:51 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 34583 invoked by uid 500); 21 Jun 2013 06:49:43 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 33934 invoked by uid 99); 21 Jun 2013 06:49:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 06:49:39 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ntyni@cc.helsinki.fi designates 128.214.173.75 as permitted sender) Received: from [128.214.173.75] (HELO smtp-rs1-vallila2.fe.helsinki.fi) (128.214.173.75) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 06:49:31 +0000 Received: from madeleine.local.invalid (hy-vpn2-231.vpn.helsinki.fi [128.214.129.231]) by smtp-rs1.it.helsinki.fi (8.14.4/8.14.4) with ESMTP id r5L6n9Zd029839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 21 Jun 2013 09:49:10 +0300 Received: from niko by madeleine.local.invalid with local (Exim 4.80) (envelope-from ) id 1Upv9g-0000Um-AE for dev@perl.apache.org; Fri, 21 Jun 2013 09:49:08 +0300 Date: Fri, 21 Jun 2013 09:49:08 +0300 From: Niko Tyni To: dev@perl.apache.org Subject: t/api/err_headers_out.t failures with HTTP::Message 6.06 Message-ID: <20130621064908.GA5082@madeleine.local.invalid> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Checked: Checked by ClamAV on apache.org --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline We recently started seeing mod_perl test failures like this: Test Summary Report ------------------- t/api/err_headers_out.t (Wstat: 0 Tests: 6 Failed: 3) Failed tests: 2-3, 5 Looking at the test code in that file: # HTTP::Headers 6.00 makes the next 2 tests fail. When the response comes # in the header name is stored as "x-err_headers_out". But when it is to # be read below it is referred as "x-err-headers-out" and hence not found. local $HTTP::Headers::TRANSLATE_UNDERSCORE= $HTTP::Headers::TRANSLATE_UNDERSCORE; undef $HTTP::Headers::TRANSLATE_UNDERSCORE if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00; HTTP::Message 6.03 has HTTP::Headers VERSION 6.00 but the recent 6.06 has 6.05. Changing that test to read 'HTTP::Headers->VERSION>=6.00' fixes the problem (although the equality comparison with a float makes me slightly nervous, but it seems to have worked earlier.) Patch attached for convenience. I couldn't find a CPAN RT ticket about this in the HTTP-Message queue. Was the problem discussed with HTTP-Message maintainers? Is there reason to expect that the problematic change will get reverted? This is . -- Niko Tyni ntyni@debian.org --Kj7319i9nmIyA2yE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Make-t-api-err_headers_out.t-work-with-HTTP-Headers-.patch" >From 7dd61e5af551cde906a39211bb8884a0ed6d7780 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Fri, 21 Jun 2013 06:33:18 +0000 Subject: [PATCH] Make t/api/err_headers_out.t work with HTTP::Headers >= 6.00 As of HTTP::Headers 6.05 (in HTTP-Message-6.03), the underscore change that needs special casing here has not been reverted, so extend the special case to all later versions for now. --- t/api/err_headers_out.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/api/err_headers_out.t b/t/api/err_headers_out.t index c9066e6..84a1ff8 100644 --- a/t/api/err_headers_out.t +++ b/t/api/err_headers_out.t @@ -25,7 +25,7 @@ my $location = '/TestAPI__err_headers_out'; local $HTTP::Headers::TRANSLATE_UNDERSCORE= $HTTP::Headers::TRANSLATE_UNDERSCORE; undef $HTTP::Headers::TRANSLATE_UNDERSCORE - if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00; + if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION>=6.00; ok t_cmp $res->header('X-err_headers_out'), "err_headers_out", "X-err_headers_out: made it"; @@ -50,7 +50,7 @@ my $location = '/TestAPI__err_headers_out'; local $HTTP::Headers::TRANSLATE_UNDERSCORE= $HTTP::Headers::TRANSLATE_UNDERSCORE; undef $HTTP::Headers::TRANSLATE_UNDERSCORE - if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00; + if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION>=6.00; ok t_cmp $res->header('X-err_headers_out'), "err_headers_out", "X-err_headers_out: made it"; -- 1.7.10.4 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org --Kj7319i9nmIyA2yE--