According to RFC 2616, section 3.6:
Whenever a transfer-coding is applied to a message-body, the set of
transfer-codings MUST include "chunked", unless the message is
terminated by closing the connection.
libwww currently does not correctly implement the "unless" clause where
the connection is closed but a transfer-coding header is present.
Attached is a small patch which fixes this. A URL that I've run
across that exhibit the problem with FilterProxy are:
http://larve.net/people/hugo/2000/07/ml-mutt
Cheers,
-- Bob
--- Methods.pm 2003-10-05 12:21:21.000000000 -0700
+++ /usr/share/perl5/Net/HTTP/Methods.pm 2003-10-05 12:24:43.000000000 -0700
@@ -367,8 +367,10 @@
}
elsif (my $te = ${*$self}{'http_te'}) {
my @te = split(/\s*,\s*/, lc($te));
+ my @connection = split(/\s*,\s*/, ${*$self}{'http_connection'});
die "Chunked must be last Transfer-Encoding '$te'"
- unless pop(@te) eq "chunked";
+ unless((pop(@te) eq "chunked") ||
+ (grep lc($_) eq "close", @connection));
for (@te) {
if ($_ eq "deflate" && zlib_ok()) {
signature.asc
Description: Digital signature
