Skip Menu |

This queue is for tickets about the Net-HTTP CPAN distribution.

Report information
The Basics
Id: 77240
Status: resolved
Priority: 0/
Queue: Net-HTTP

People
Owner: Nobody in particular
Requestors: trey.bianchini [...] iinteractive.com
Cc: JHANNAH [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 6.00
Fixed in: (no value)



Subject: Transfer-Encoding chunked,chunked causing x-died in Net::HTTP::Methods
When server returns returns two HTTP Transfer-Encoding headers of 'chunked', LWP::UserAgent returns a code of 200 and an empty content. in the response headers is an 'x-died' => 'Can\'t handle transfer encoding \'chunked,chunked\' at /home/tbianchini/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Net/HTTP/Methods.pm line 452.' Browsers handle this so I think LWP::UserAgent should be able to too. Here is a patch ->diff Methods.pm.orig Methods.pm 370a371 Show quoted text
> my $chunked;
377c378,383 < push(@te, $te) if length($te); --- Show quoted text
> if ( length($te) ) { > if ( $te eq 'chunked' ) { > $chunked++; > } > push(@te, $te) > }
384a391,393 Show quoted text
> } > if ( $chunked > 1 & scalar @te == $chunked ) { > @te=qw(chunked);
rwxr--r-- 1 tbianchini tbianchini 14942 May 16 10:10 ./Methods.pm Show quoted text
>head ./Methods.pm
package Net::HTTP::Methods; require 5.005; # 4-arg substr use strict; use vars qw($VERSION); $VERSION = "6.00"; Net-Http v 6.0 perl -v (v5.14.2) Linux 2.6.32-5-amd64
On Wed May 16 11:21:49 2012, trey.bianchini@iinteractive.com wrote: Show quoted text
> Here is a patch
I submitted a variation of Trey's patch, plus tests for it, in a pull request in github: https://github.com/gisle/net-http/pull/1 Thanks, in advance, for your time. :) j