tag 709680 patch thanks On Sat, May 25, 2013 at 12:54:01AM +0100, Dominic Hargreaves wrote: > Source: libcgi-application-plugin-stream-perl > Version: 2.10-1 > Severity: important > User: debian-p...@lists.debian.org > Usertags: perl-5.18-transition > Tags: sid jessie > Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=81646 > > This package FTBFS with perl 5.18 from experimental (in a clean sbuild > session): > > # Failed test 'Setting a custom Content-Length' > # at t/basic.t line 66.
Patch attached. -- Niko Tyni nt...@debian.org
>From 033197cf2fb313209711a25cef2e15ae74c5b7ff Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Tue, 13 Aug 2013 16:05:10 +0000 Subject: [PATCH] Fix a test failure due triggered by hash randomization changes in Perl 5.17.6 Quoting the CGI.pm documentation for the header() method: Each argument name is preceded by a dash. Neither case nor order matters in the argument list. -type, -Type, and -TYPE are all acceptable. In fact, only the first argument needs to begin with a dash. If a dash is present in the first argument, CGI.pm assumes dashes for the subsequent ones. The stream_file() method in CGI::Application::Plugin::Stream uses this method, and when 'Content_length' happens to be the first key in the argument hash, it is erroneously interpreted as the document type, not as the name of the tag. --- t/basic.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/basic.t b/t/basic.t index 3cb0f2e..e2c37f0 100644 --- a/t/basic.t +++ b/t/basic.t @@ -60,7 +60,7 @@ like($content_sent, qr/Content-Length: 29/i,$test_name); $test_name = 'Setting a custom Content-Length'; $app = StreamTest->new(); -$app->header_props(Content_Length => 1 ); +$app->header_props(-Content_Length => 1 ); $app->with_fh(); $content_sent = $stdout->read; like($content_sent, qr/Content-Length: 1/i,$test_name); -- 1.8.4.rc2