x_died: Can't handle transfer encoding 'chunked,chunked'

2012-04-12 Thread Kevin Chernoff
(Forgive me if I'm doing this wrong, I haven't used this mailing list before)

Jesper;
I ran into the same issue and worked around it for now by making a
small modification to the referenced Methods.pm:
At line 442, right after:
elsif ($_ eq identity) {
$_ = sub { $_[0] };
}
Add:
elsif ($_ eq chunked) {
pop(@te);
#Workaround for multiple chunked entries
}

Much better perl programmers will probably tell me there's a
better/cleaner way to do this (my method may well break the encoding
handler for complex scenarios with multiple copies of chunked mixed
in with other types) but it works well enough for me to continue
developing/testing my current app until the dev responsible for the
bug in the web app I'm coding against fixes his side of things to
prevent the doubled chunk encoding in the first place.


x_died: Can't handle transfer encoding 'chunked,chunked'

2012-04-12 Thread Kevin Chernoff
(Forgive me if I'm doing this wrong, I haven't used this mailing list before)

Jesper;
I ran into the same issue and worked around it for now by making a
small modification to the referenced Methods.pm:
At line 442, right after:
   elsif ($_ eq identity) {
   $_ = sub { $_[0] };
   }
Add:
   elsif ($_ eq chunked) {
   pop(@te);
   #Workaround for multiple chunked entries
   }
Much better perl programmers will probably tell me there's a
better/cleaner way to do this (my method may well break the encoding
handler for complex scenarios with multiple copies of chunked mixed
in with other types) but it works well enough for me to continue
developing/testing my current app until the dev responsible for the
bug in the web app I'm coding against fixes his side of things to
prevent the doubled chunk encoding in the first place.


x_died: Can't handle transfer encoding 'chunked,chunked'

2012-01-18 Thread Jesper Persson
A website is sending the same http header twice:
Client-Transfer-Encoding: chunked
Client-Transfer-Encoding: chunked

Which gives an error:
Can't handle transfer encoding 'chunked,chunked' at
C:/Perl64/site/lib/Net/HTTP/Methods.pm line 443.

perl code:

use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $request = HTTP::Request-new('GET');
$request-url('http://www.virk.dk');
my $response = $ua-request($request);
my $x_died = $response-header(X-Died);
print x_died: $x_died\n;
^D
x_died: Can't handle transfer encoding 'chunked,chunked' at
C:/Perl64/site/lib/Net/HTTP/Methods.pm line 443.

Is there anything I can do to avoid this?

Best Regards,

Jesper Persson