Bob McElrath <[EMAIL PROTECTED]> writes:

> This version doesn't cause a warning if the "Connection" header isn't
> present.

Perhaps this warnings shows becase nothing sets 'http_connection'.  
Do you have further patches to Net::HTTP not shown here.


> Bob McElrath [EMAIL PROTECTED] wrote:
> > 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.

I agree.

> > 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

I don't see any problem with this one.  Do you have other examples?

Regards,
Gisle

> --- Methods.pm        2003-10-05 12:21:21.000000000 -0700
> +++ /usr/share/perl5/Net/HTTP/Methods.pm      2003-10-05 13:01:53.000000000 -0700
> @@ -367,8 +367,12 @@
>       }
>       elsif (my $te = ${*$self}{'http_te'}) {
>           my @te = split(/\s*,\s*/, lc($te));
> +            my @connection = split(/\s*,\s*/, 
> +                defined ${*$self}{'http_connection'}
> +                    ?${*$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()) {

Reply via email to