r75812 - in /trunk/libapache2-mod-perl2/debian: changelog patches/230-test-failures-fix.patch patches/series
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Thu Jun 16 08:35:36 UTC 2011
Author: carnil
Date: Thu Jun 16 08:35:24 2011
New Revision: 75812
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75812
Log:
* Team upload.
* Add 230-test-failures-fix.patch. Fixes for the testsuite to be
compatible with >= LWP + HTTP:Headers 6.0. (LP: #797716),
(Closes: #628296).
Added:
trunk/libapache2-mod-perl2/debian/patches/230-test-failures-fix.patch
Modified:
trunk/libapache2-mod-perl2/debian/changelog
trunk/libapache2-mod-perl2/debian/patches/series
Modified: trunk/libapache2-mod-perl2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/changelog?rev=75812&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/changelog (original)
+++ trunk/libapache2-mod-perl2/debian/changelog Thu Jun 16 08:35:24 2011
@@ -1,3 +1,12 @@
+libapache2-mod-perl2 (2.0.5-2) UNRELEASED; urgency=low
+
+ * Team upload.
+ * Add 230-test-failures-fix.patch. Fixes for the testsuite to be
+ compatible with >= LWP + HTTP:Headers 6.0. (LP: #797716),
+ (Closes: #628296).
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Thu, 16 Jun 2011 09:49:21 +0200
+
libapache2-mod-perl2 (2.0.5-1) unstable; urgency=low
[ Nicholas Bamber ]
Added: trunk/libapache2-mod-perl2/debian/patches/230-test-failures-fix.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/patches/230-test-failures-fix.patch?rev=75812&op=file
==============================================================================
--- trunk/libapache2-mod-perl2/debian/patches/230-test-failures-fix.patch (added)
+++ trunk/libapache2-mod-perl2/debian/patches/230-test-failures-fix.patch Thu Jun 16 08:35:24 2011
@@ -1,0 +1,111 @@
+Description: Fixes for the testsuite to be compatible with >= LWP + HTTP:Headers 6.0.
+ This patch is created from 4 upstream trunk commits folded.
+ Resolves FTBFS for failures during the testsuite run.
+ .
+ Upstream commit log:
+ * LWP 6.x uses HTTP/1.1 but t/response/TestAPI/request_rec.pm assumes it is always called using HTTP/1.0
+ * HTTP::Headers at least in version 6.00 does not translate underscores to minus when storing headers but does so when they are read.
+ * next try: restrict localization of $HTTP::Headers::TRANSLATE_UNDERSCORE to HTTP::Headers 6.00 only
+ * fixed a wrong content-length header in t/filter/TestFilter/out_str_reverse.pm
+Origin: commit:1089411, http://svn.apache.org/viewvc?view=revision&revision=1089411
+Origin: commit:1089349, http://svn.apache.org/viewvc?view=revision&revision=1089349
+Origin: commit:1089363, http://svn.apache.org/viewvc?view=revision&revision=1089349
+Origin: commit:1089414, http://svn.apache.org/viewvc?view=revision&revision=1089414
+Bug-Ubuntu: https://launchpad.net/bugs/797716
+Bug-Debian: http://bugs.debian.org/628296
+From: Dave Walker (Daviey) <DaveWalker at ubuntu.com>
+Last-Update: 2011-06-15
+
+--- a/t/api/err_headers_out.t
++++ b/t/api/err_headers_out.t
+@@ -19,6 +19,14 @@
+
+ ok t_cmp $res->code, 200, "OK";
+
++ # 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;
++
+ ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
+ "X-err_headers_out: made it";
+
+@@ -36,6 +44,14 @@
+
+ ok t_cmp $res->code, 404, "not found";
+
++ # HTTP::Headers 6.00 makes this test 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;
++
+ ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
+ "X-err_headers_out: made it";
+
+--- a/t/filter/TestFilter/out_str_reverse.pm
++++ b/t/filter/TestFilter/out_str_reverse.pm
+@@ -16,12 +16,21 @@
+ use Apache2::Const -compile => qw(OK M_POST);
+
+ use constant BUFF_LEN => 2;
++use constant signature => "Reversed by mod_perl 2.0\n";
+
+ sub handler {
+ my $f = shift;
+ #warn "called\n";
+
+ my $leftover = $f->ctx;
++
++ # We are about to change the length of the response body. Hence, we
++ # have to adjust the content-length header.
++ unless (defined $leftover) { # 1st invocation
++ $f->r->headers_out->{'Content-Length'}+=length signature
++ if exists $f->r->headers_out->{'Content-Length'};
++ }
++
+ while ($f->read(my $buffer, BUFF_LEN)) {
+ #warn "buffer: [$buffer]\n";
+ $buffer = $leftover . $buffer if defined $leftover;
+@@ -34,7 +43,7 @@
+
+ if ($f->seen_eos) {
+ $f->print(scalar reverse $leftover) if defined $leftover;
+- $f->print("Reversed by mod_perl 2.0\n");
++ $f->print(signature);
+ }
+ else {
+ $f->ctx($leftover) if defined $leftover;
+--- a/t/response/TestAPI/request_rec.pm
++++ b/t/response/TestAPI/request_rec.pm
+@@ -57,8 +57,9 @@
+
+ ok $r->protocol =~ /http/i;
+
+- # HTTP 1.0
+- ok t_cmp $r->proto_num, 1000, 't->proto_num';
++ # LWP >=6.00 uses HTTP/1.1, other HTTP/1.0
++ ok t_cmp $r->proto_num, 1000+substr($r->the_request, -1),
++ 't->proto_num';
+
+ ok t_cmp lc($r->hostname), lc($r->get_server_name), '$r->hostname';
+
+@@ -124,7 +125,12 @@
+
+ ok t_cmp $r->args, $args, '$r->args';
+
+- ok t_cmp $r->the_request, "GET $base_uri$path_info?$args HTTP/1.0",
++ # LWP uses HTTP/1.1 since 6.00
++ ok t_cmp $r->the_request, qr!GET
++ \x20
++ \Q$base_uri$path_info\E\?\Q$args\E
++ \x20
++ HTTP/1\.\d!x,
+ '$r->the_request';
+
+ {
Modified: trunk/libapache2-mod-perl2/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/patches/series?rev=75812&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/patches/series (original)
+++ trunk/libapache2-mod-perl2/debian/patches/series Thu Jun 16 08:35:24 2011
@@ -9,3 +9,4 @@
200_fix-pod-spelling-errors.patch
210_fix-pod-errors.patch
220_fix-bad-whatis-entry.patch
+230-test-failures-fix.patch
More information about the Pkg-perl-cvs-commits
mailing list