[libapache2-mod-perl2] 02/05: Fix intermittent failures in t/apache/read3.t. (Closes: #697682)

Niko Tyni ntyni at moszumanska.debian.org
Sun Aug 10 20:12:37 UTC 2014


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 9d375708833829d62375eff21cfd94c951fae365
Author: Niko Tyni <ntyni at debian.org>
Date:   Sat Aug 9 16:50:56 2014 +0300

    Fix intermittent failures in t/apache/read3.t. (Closes: #697682)
---
 debian/changelog                                   |  2 +-
 ...r-anything-to-the-client-before-it-s-done.patch | 45 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 451d9df..704a807 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 libapache2-mod-perl2 (2.0.9~1604013-2) UNRELEASED; urgency=medium
 
-  * 
+  * Fix intermittent failures in t/apache/read3.t. (Closes: #697682) 
 
  -- Niko Tyni <ntyni at debian.org>  Sat, 09 Aug 2014 16:48:01 +0300
 
diff --git a/debian/patches/430-Don-t-answer-anything-to-the-client-before-it-s-done.patch b/debian/patches/430-Don-t-answer-anything-to-the-client-before-it-s-done.patch
new file mode 100644
index 0000000..2fdd502
--- /dev/null
+++ b/debian/patches/430-Don-t-answer-anything-to-the-client-before-it-s-done.patch
@@ -0,0 +1,45 @@
+From 26723f0d2f0f9fbaf42cbb46aed6ebd1f5ffbe8b Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Fri, 8 Aug 2014 17:22:33 +0000
+Subject: [PATCH 1/2] Don't answer anything to the client before it's done
+ sending the POST data
+
+LWP::Protocol::http sends long POST requests with several write() calls.
+If it gets a response with a full HTTP header (up to the two newlines)
+before it's done with the later write() calls sending the actual POST data,
+it will stop writing. This leads to a deadlock and a test failure after
+timeout.
+
+Upstream thread at
+ http://mail-archives.apache.org/mod_mbox/perl-dev/201408.mbox/%3C20140809104131.GA3670@estella.local.invalid%3E
+
+Bug-Debian: https://bugs.debian.org/697682
+---
+ t/response/TestApache/read3.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/t/response/TestApache/read3.pm b/t/response/TestApache/read3.pm
+index 8ad9f26..2994093 100644
+--- a/t/response/TestApache/read3.pm
++++ b/t/response/TestApache/read3.pm
+@@ -20,8 +20,6 @@ my $expected = "foobar"x2000;
+ sub handler {
+     my $r = shift;
+ 
+-    plan $r, tests => 1;
+-
+     # test to read data up to end of file is signaled
+     my $data = '';
+     my $where = 0;
+@@ -31,6 +29,8 @@ sub handler {
+         $where += $len;
+     } while ($len > 0);
+ 
++    plan $r, tests => 1;
++
+     ok t_cmp($data, $expected, "reading up to end of file");
+ 
+     Apache2::Const::OK;
+-- 
+2.1.0.rc1
+
diff --git a/debian/patches/series b/debian/patches/series
index e856785..24bf162 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,3 +18,4 @@ avoid-db-linkage.patch
 400-Define-MP_IN_XS-to-avoid-referencing-perl_module-out.patch
 410-Restore-httpd-2.4-compatibility-in-lib-Apache2-compa.patch
 420-Mark-failing-tests-in-t-perl-ithreads3.t-as-TODO.patch
+430-Don-t-answer-anything-to-the-client-before-it-s-done.patch

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



More information about the Pkg-perl-cvs-commits mailing list