Bob McElrath <[EMAIL PROTECTED]> writes: > 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.
In the source I have there is nothing at all that set or reference 'http_connection' that your patch test for. What version of LWP are you patching against? > > > > 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> Without the patch I get: [EMAIL PROTECTED] lwp5]$ lwp-request -USe http://larve.net/people/hugo/2000/07/ml-mutt | head -30 GET http://larve.net/people/hugo/2000/07/ml-mutt User-Agent: lwp-request/2.01 GET http://larve.net/people/hugo/2000/07/ml-mutt --> 200 OK Cache-Control: max-age=21600 Connection: close Date: Tue, 14 Oct 2003 16:09:12 GMT ETag: "8buij7:ub1p6un0" Server: Jigsaw/2.2-20010823 jre/1.2.2_009 javacomp/1.2.15 ... The TCP dump shows this conversation: GET /people/hugo/2000/07/ml-mutt HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Host: larve.net User-Agent: lwp-request/2.01 HTTP/1.1 200 OK Cache-Control: max-age=21600 Connection: close Date: Tue, 14 Oct 2003 16:09:12 GMT Transfer-Encoding: deflate,chunked 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 22:09:12 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 400 [binary data] Are you perhaps talking via a proxy server of some kind? > 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. I think that is ok. If the server sends the Transfer-Encoding we could always try if it works. As you see above I don't see a HTTP/1.0 response. Regards, Gisle