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 <http://bugs.debian.org/710873>. -- Niko Tyni nt...@debian.org
>From 7dd61e5af551cde906a39211bb8884a0ed6d7780 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> 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
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org For additional commands, e-mail: dev-h...@perl.apache.org