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

ntyni pushed a commit to branch master
in repository libhttp-proxy-perl.

commit 414c90a5621c6feb5a9fb5f5a6a06f251f3893c5
Author: Niko Tyni <nt...@debian.org>
Date:   Fri Oct 16 20:08:42 2015 +0300

    Patch the test suite to work around LWP::UserAgent / Net::HTTP buffering
    
    It's possible for the LWP::UserAgent request() call to get both the
    headers and (parts of) the body in the same read(2) call. When that
    happens, Net::HTTP (as used by LWP::UserAgent) will buffer the body,
    but the explicit read() call on the socket bypasses this buffering,
    resulting in empty data.
    
    Mark the resulting test failures as TODO by breaking encapsulation and
    peeking in the Net::HTTP buffer. Note that this is a hack and not a
    proper fix.
    
    Closes: 798792
---
 ...k-around-LWP-UserAgent-Net-HTTP-buffering.patch | 46 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 47 insertions(+)

diff --git 
a/debian/patches/0001-Work-around-LWP-UserAgent-Net-HTTP-buffering.patch 
b/debian/patches/0001-Work-around-LWP-UserAgent-Net-HTTP-buffering.patch
new file mode 100644
index 0000000..403efc4
--- /dev/null
+++ b/debian/patches/0001-Work-around-LWP-UserAgent-Net-HTTP-buffering.patch
@@ -0,0 +1,46 @@
+From 06c067ccf385931369b4c324c4cdc3b54c6dbcfa Mon Sep 17 00:00:00 2001
+From: Niko Tyni <nt...@debian.org>
+Date: Fri, 16 Oct 2015 20:08:42 +0300
+Subject: [PATCH] Work around LWP::UserAgent / Net::HTTP buffering
+
+It's possible for the LWP::UserAgent request() call to get both the
+headers and (parts of) the body in the same read(2) call. When that
+happens, Net::HTTP (as used by LWP::UserAgent) will buffer the body,
+but the explicit read() call on the socket bypasses this buffering,
+resulting in empty data.
+
+Mark the resulting test failures as TODO by breaking encapsulation and
+peeking in the Net::HTTP buffer. Note that this is a hack and not a
+proper fix.
+
+Bug-Debian: https://bugs.debian.org/798792
+Bug: https://github.com/book/HTTP-Proxy/issues/7
+---
+ t/23connect.t | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/t/23connect.t b/t/23connect.t
+index d1b5ff2..5f25aed 100644
+--- a/t/23connect.t
++++ b/t/23connect.t
+@@ -67,6 +67,9 @@ plan tests => 4;
+     # what does the proxy say?
+     is( $res->code, 200, "The proxy accepts CONNECT requests" );
+ 
++  TODO: {
++    local $TODO = "problems with Net::HTTP buffering, see 
https://github.com/book/HTTP-Proxy/issues/7";
++        if $sock->can("_rbuf") and $sock->_rbuf ne '';
+     # read a line
+     my $read;
+     eval {
+@@ -77,6 +80,7 @@ plan tests => 4;
+ 
+     ok( $read, "Read some data from the socket" );
+     is( $read, $banner, "CONNECTed to the TCP server and got the banner" );
++  }
+     close $sock;
+ 
+     # make sure the kids are dead
+-- 
+2.5.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5162df7..074a955 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 hashbang.patch
+0001-Work-around-LWP-UserAgent-Net-HTTP-buffering.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libhttp-proxy-perl.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