Gisle Aas [EMAIL PROTECTED] wrote:
> 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'.  

Of course.  The warning was a bug in my original patch.  The patch is
trying to fix the transfer-encoding bug indicated below.

> Do you have further patches to Net::HTTP not shown here.

No more patches.

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

Without patch:
    (1)<[EMAIL PROTECTED]:/home/mcelrath> lwp-request -U 
http://larve.net/people/hugo/2000/07/ml-mutt
    GET http://larve.net/people/hugo/2000/07/ml-mutt
    User-Agent: lwp-request/2.01

    <HTML>
    <HEAD><TITLE>An Error Occurred</TITLE></HEAD>
    <BODY>
    <H1>An Error Occurred</H1>
    500 Chunked must be last Transfer-Encoding 'deflate'
    </BODY>
    </HTML>

With patch:
    (0)<[EMAIL PROTECTED]:/home/mcelrath> lwp-request -ue 
http://larve.net/people/hugo/2000/07/ml-mutt
    GET http://larve.net/people/hugo/2000/07/ml-mutt
    Cache-Control: max-age=21600
    Connection: close
    Date: Tue, 14 Oct 2003 14:25:30 GMT
    ETag: "8buij7:ub1p6un0"
    Server: Jigsaw/2.2-20010823 jre/1.2.2_009 javacomp/1.2.15
    Content-Location: http://larve.net/people/hugo/2000/07/ml-mutt.html
    Content-Type: text/html;charset=us-ascii
    Content-Type: text/html; charset=us-ascii
    Expires: Tue, 14 Oct 2003 20:25:30 GMT
    Last-Modified: Thu, 16 Jan 2003 04:11:55 GMT
    11-PolicyRef: /2000/08/p3p-policyref
    Client-Date: Tue, 14 Oct 2003 14:17:52 GMT
    Client-Peer: 18.29.5.151:80
    Client-Response-Num: 1
    Client-Transfer-Encoding: deflate,chunked
    Link: </stylesheets/base>; /="/"; rel="stylesheet"; type="text/css"
    Opt: "http://www.w3.org/2000/P3Pv1";ns=11
    Title: Using Mutt to send emails to mailing lists

    [...document...]

The 500 error is generated by LWP, not the HTTP server.  The actual
headers sent by the server are (snooping with ngrep):
     HTTP/1.0 200 OK
     Connection: close
     Date: Tue, 14 Oct 2003 14:34:21 GMT
     Transfer-Encoding: deflate
     Opt: "http://www.w3.org/2000/P3Pv1";ns=11
     Content-Location: http://larve.net/people/hugo/2000/07/ml-mutt.html
     Content-Type: text/html;charset=us-ascii
     Etag: "8buij7:ub1p6un0"
     Expires: Tue, 14 Oct 2003 20:34:21 GMT
     Last-Modified: Thu, 16 Jan 2003 04:11:55 GMT
     Server: Jigsaw/2.2-20010823 jre/1.2.2_009 javacomp/1.2.15..11-PolicyRef: 
/2000/08/p3p-policyref

I have no control over this server.  It would appear that it is using a
HTTP/1.1 header (Transfer-Encoding) in a HTTP/1.0 response, which is
probably not so kosher.  But the method read_entity_body that my patch
applies to does not check the HTTP version anyway.

Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

    "Knowledge will forever govern ignorance, and a people who mean to
    be their own governors, must arm themselves with the power knowledge
    gives. A popular government without popular information or the means
    of acquiring it, is but a prologue to a farce or a tragedy or
    perhaps both."
        - James Madison

Attachment: signature.asc
Description: Digital signature

Reply via email to