This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository libapache2-mod-perl2.

commit 9f72b2c9ccf876c698cc3bc20f7955450012a2d7
Author: Niko Tyni <nt...@debian.org>
Date:   Sat Dec 24 23:12:45 2016 +0200

    Patch the test suite for Apache 2.4.24 compatibility
    
    Apache now defaults to 'strict mode', highlighting a few glitches in
    the test suite that used to work in the old, more lenient mode.
    
    Thanks to Stefan Fritsch.
    
    Closes: 849082
---
 debian/patches/370_http_syntax.patch               | 33 ++++++++++++++++
 .../380_inject_header_line_terminators.patch       | 45 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 80 insertions(+)

diff --git a/debian/patches/370_http_syntax.patch 
b/debian/patches/370_http_syntax.patch
new file mode 100644
index 0000000..465d0c4
--- /dev/null
+++ b/debian/patches/370_http_syntax.patch
@@ -0,0 +1,33 @@
+From 4a803fdb4c9eae8538293fe31c9222eecb6465be Mon Sep 17 00:00:00 2001
+From: Niko Tyni <nt...@debian.org>
+Date: Fri, 23 Dec 2016 18:27:23 +0200
+Subject: [PATCH 1/2] Fix t/apache/read.t HTTP syntax for Apache 2.4.24
+ compatibility
+
+HTTP/1.1 RFC 7230, section 2.6. "Protocol Versioning" says the HTTP name
+is case sensitive. Starting with Apache 2.4.24, using lower case will
+make the server issue a 400 Bad request response, causing a test failure.
+
+https://tools.ietf.org/html/rfc7230#section-2.6
+
+Bug-Debian: https://bugs.debian.org/849082
+---
+ t/apache/read.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/t/apache/read.t b/t/apache/read.t
+index 83670c9..9f7f504 100644
+--- a/t/apache/read.t
++++ b/t/apache/read.t
+@@ -24,7 +24,7 @@ close $fh;
+ 
+ my $size = length $data;
+ 
+-for my $string ("POST $location http/1.0",
++for my $string ("POST $location HTTP/1.0",
+                 "Content-length: $size",
+                 "") {
+     my $line = "$string\r\n";
+-- 
+2.11.0
+
diff --git a/debian/patches/380_inject_header_line_terminators.patch 
b/debian/patches/380_inject_header_line_terminators.patch
new file mode 100644
index 0000000..daaab51
--- /dev/null
+++ b/debian/patches/380_inject_header_line_terminators.patch
@@ -0,0 +1,45 @@
+From d59229cf4f5b91ed58e25e27977e76f59096b72d Mon Sep 17 00:00:00 2001
+From: Niko Tyni <nt...@debian.org>
+Date: Sat, 24 Dec 2016 23:07:28 +0200
+Subject: [PATCH 2/2] Fix in_bbs_inject_header line terminators for Apache
+ 2.4.24 compatibility
+
+rfc7230 3.5 says:
+
+  Although the line terminator for the start-line and header fields is
+   the sequence CRLF, a recipient MAY recognize a single LF as a line
+   terminator and ignore any preceding CR.
+
+Apache with strict enabled chooses not to implement the MAY.
+
+Author: Stefan Fritsch <s...@sfritsch.de>
+Bug-Debian: https://bugs.debian.org/849082
+---
+ t/filter/TestFilter/in_bbs_inject_header.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/t/filter/TestFilter/in_bbs_inject_header.pm 
b/t/filter/TestFilter/in_bbs_inject_header.pm
+index b09d6f9..5380c65 100644
+--- a/t/filter/TestFilter/in_bbs_inject_header.pm
++++ b/t/filter/TestFilter/in_bbs_inject_header.pm
+@@ -181,7 +181,7 @@ sub handler : FilterConnectionHandler {
+ 
+         if ($data and $data =~ /^POST/) {
+             # demonstrate how to add a header while processing other headers
+-            my $header = "$header1_key: $header1_val\n";
++            my $header = "$header1_key: $header1_val\r\n";
+             push @{ $ctx->{buckets} }, APR::Bucket->new($c->bucket_alloc, 
$header);
+             debug "queued header [$header]";
+         }
+@@ -199,7 +199,7 @@ sub handler : FilterConnectionHandler {
+             # we hit the headers and body separator, which is a good
+             # time to add extra headers:
+             for my $key (keys %headers) {
+-                my $header = "$key: $headers{$key}\n";
++                my $header = "$key: $headers{$key}\r\n";
+                 push @{ $ctx->{buckets} }, APR::Bucket->new($c->bucket_alloc, 
$header);
+                 debug "queued header [$header]";
+             }
+-- 
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index fa2de9f..ac7be0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,5 @@ avoid-db-linkage.patch
 360-conditional-linux-pid-module.patch
 0001-Skip-t-protocol-pseudo_http.t-incompatible-with-Apac.patch
 honour-env-LDFLAGS.patch
+370_http_syntax.patch
+380_inject_header_line_terminators.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libapache2-mod-perl2.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to