The support is to deal with buggy servers sending chunked-encoded replies
to a HTTP/1.0 request from Squid.
Adrian
On Fri, Jan 19, 2007, ShuXin Zheng wrote:
> Hi, I'm glad to see squid2.6-stable7 began to support chunked transfer.
> But I think there are some problem in it. In function
> "httpBuildRequestPrefix"
> of http.c file, the squid builds the http request with "HTTP/1.0", the
> web server,
> such as MS-IIS, Apache and Tomcat will not reply squid-proxy with
> "Transfer-Encoding: chunked" after receiving the HTTP request with the
> HTTP/1.0
> version. So the transfer-encoding process may not be used in real
> application
> environment. The reason is that the RFC2616 describes the following:
> 1) in "3.6 Transfer Codings" section:
> ... A server MUST NOT send transfer-codings to an HTTP/1.0 client. ...
>
> And there are some problems when handling the condition that
> Transfer-Encoding and
> Conteng-Length are presented at the same time. See function
> "httpProcessReplyHeader"
> in http.c as below:
> if (httpState->flags.chunked && reply->content_length >= 0) {
> /* Can't have a content-length in chunked encoding */
> reply->sline.status = HTTP_INVALID_HEADER;
> return done;
> }
> We should prefer to use "Transfer-Encoding" when Transfer-Encoding and
> Content-Length
> are all presented. See RFC2616 "4.4 Message Length" section:
> 3.If a Content-Length header field (section 14.13) is present, its
> decimal value in OCTETs represents both the entity-length and the
> transfer-length. The Content-Length header field MUST NOT be sent
> if these two lengths are different (i.e., if a Transfer-Encoding
> header field is present). If a message is received with both a
> Transfer-Encoding header field and a Content-Length header field,
> the latter MUST be ignored.
>
>
> zsx
> 2007/1/19
>
> On 1/19/07, Henrik Nordstrom <henrik@henriknordstrom.net> wrote:
> >Due to Bug #1872 2.6.STABLE8 is due for release lot earlier than
> >intended (significant cache error introduced in 2.6.STABLE6).
> >
> >The next nightly (released in 24 hours) is to be considered a
> >2.6.STABLE8 release candidate. Please give it the best testing you can.
> >There has been quite substantial changes since STABLE7, most notably it
> >now dechunks chunked encoding should a server send us chunked..
> >
> >After this release Squid-2.6 will be branched from Squid-2, allowing
> >more intrusive fixes to be tested properly in Squid-2 before getting
> >into the release and also avoiding accidental commits while a release is
> >being prepared. If you make bugfixes just commit them on Squid-2 HEAD as
> >usual.
> >
> >Regards
> >Henrik
> >
> >
>
>
> --
> zsxxsz
-- - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support - - $25/pm entry-level bandwidth-capped VPSes available in WA -Received on Thu Jan 18 2007 - 22:56:03 MST
This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:02 MST