forwarded 674788 https://rt.cpan.org/Public/Bug/Display.html?id=74431 tags 674788 patch thanks
Hello, On sekmadienis 27 Gegužė 2012 19:29:59 Modestas Vainius wrote: > If I disable show_progress(), the bug does not occur (probably because the > response is not chunked then). > > This bug could be related to > https://bugzilla.redhat.com/show_bug.cgi?id=768394 I have found a similar bug reported upstream [1]. It has a patch attached at [2]. I tested a patch and it seems to work. I can't tell for sure since the bug is not 100% reproducible but I tried a bunch of times and my bug script has never failed. I attach a debdiff for the almost-ready-to-be-uploaded package which contains that patch. Thank you for considering. The bug breaks pkgkde-getbuildlogs in pkg-kde-tools (incomplete logs are received) hence it's pretty annoying. [1] https://rt.cpan.org/Public/Bug/Display.html?id=74431 [2] https://rt.cpan.org/Public/Bug/Display.html?id=74431#txn-1076013 -- Modestas Vainius <mo...@debian.org>
diff -Nru libnet-http-perl-6.03/debian/changelog libnet-http-perl-6.03/debian/changelog --- libnet-http-perl-6.03/debian/changelog 2012-02-17 17:42:35.000000000 +0200 +++ libnet-http-perl-6.03/debian/changelog 2012-06-02 13:45:25.000000000 +0300 @@ -1,3 +1,11 @@ +libnet-http-perl (6.03-2~mdx1) UNRELEASED; urgency=low + + [ Modestas Vainius ] + * Add fix_chunked_decoding_674788.diff patch to fix a problem with chunked + decoding. (Closes: #674788) + + -- Modestas Vainius <mo...@debian.org> Sat, 02 Jun 2012 13:43:48 +0300 + libnet-http-perl (6.03-1) unstable; urgency=low * Imported Upstream version 6.03. diff -Nru libnet-http-perl-6.03/debian/patches/fix_chunked_decoding_674788.diff libnet-http-perl-6.03/debian/patches/fix_chunked_decoding_674788.diff --- libnet-http-perl-6.03/debian/patches/fix_chunked_decoding_674788.diff 1970-01-01 03:00:00.000000000 +0300 +++ libnet-http-perl-6.03/debian/patches/fix_chunked_decoding_674788.diff 2012-06-02 13:49:37.000000000 +0300 @@ -0,0 +1,31 @@ +From: Dagfinn Ilmari Manns책ker <ilm...@ilmari.org> +Subject: Fix a problem with chunked decoding +Forwarded: yes +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=74431 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674788 +Origin: other, https://rt.cpan.org/Public/Bug/Display.html?id=74431#txn-1076013 +Last-Update: 2012-06-02 + +If the first read after a chunk header returns EAGAIN or EINTR, the +chunked state stored in the client object doesn't get updated, so the +next call to ->read_entity_body tries to read the chunk header again, +and gives a "Missing newline after chunk data" error. + +This fixes it by updating ${*$self}{'http_chunked'} immediately after +the chunk header has been read, so that the state persist to the next +call. +--- + lib/Net/HTTP/Methods.pm | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/lib/Net/HTTP/Methods.pm ++++ b/lib/Net/HTTP/Methods.pm +@@ -488,7 +488,7 @@ sub read_entity_body { + unless ($chunk_len =~ /^([\da-fA-F]+)\s*$/) { + die "Bad chunk-size in HTTP response: $line"; + } +- $chunked = hex($1); ++ ${*$self}{'http_chunked'} = $chunked = hex($1); + if ($chunked == 0) { + ${*$self}{'http_trailers'} = [$self->_read_header_lines]; + $$buf_ref = ""; diff -Nru libnet-http-perl-6.03/debian/patches/series libnet-http-perl-6.03/debian/patches/series --- libnet-http-perl-6.03/debian/patches/series 1970-01-01 03:00:00.000000000 +0300 +++ libnet-http-perl-6.03/debian/patches/series 2012-06-02 13:43:38.000000000 +0300 @@ -0,0 +1 @@ +fix_chunked_decoding_674788.diff
signature.asc
Description: This is a digitally signed message part.