Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 94993 invoked by uid 500); 15 Nov 2002 20:55:35 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 94971 invoked from network); 15 Nov 2002 20:55:35 -0000 Subject: Re: mod_cache and multiple brigade From: Brian Pane To: dev@httpd.apache.org In-Reply-To: <3DD38AFF.1080406@ifrance.com> References: <3DD38AFF.1080406@ifrance.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Date: 15 Nov 2002 13:00:10 -0800 Message-Id: <1037394011.3935.4.camel@desktop> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks for all the diagnostic information. I'll set aside some time to take a look at the problem this weekend if nobody else gets to it first. Brian On Thu, 2002-11-14 at 03:37, Estrade Matthieu wrote: > Hi, >=20 > i will quickly draw the problem i found 1 month ago: >=20 > When i am with apache + mod_proxy + mod_cache > client --> reverse_proxy_cache --> backend. >=20 > when the client ask for a document which will be handled with multiple=20 > brigade, the first time when mod_cache is caching the document, the=20 > client browser is able to display the document. > When the client ask again the document, mod_cache serve it from cache=20 > and the client browser refuse to display it. >=20 > I found it was because the client browser received Content-Length header=20 > and Transfer-Encoding=3Dchunked header at the same time. > I put debug in mod_proxy and mod_cache, and i found: >=20 > when the backend answer the first request to multiple brigade handled=20 > document: >=20 > backend > - > mod_proxy: content_length=3Dsize, no transfer-encoding headers and=20 > r->chunked =3D0. > mod_proxy: delete content-length and Transfer-encoding headers. > http_protocol.c: ap_set_keepalive don't find CL or TE headers so:=20 > r->chunked=3D0 at beginning, r->chunked =3D1 when ending. > http_protocol.c: ap_http_header_filter find r->chunked=3D1 so: add header= =20 > "Transfer-Encoding"=3Dchunked > mod_cache: find Transfer-Encoding=3Dchunked headers and store it in memor= y. > mod_cache: know the length of data he stored in memory and and the CL=20 > header with length of data > - > client >=20 > When the backend answer the second request to multiple brigade handled=20 > document: >=20 > rp+cache > - > mod_cache:cache_out:read_ headers: read headers from what he stored in=20 > memory > mod_cache:cache_out: send the two headers, CL and TE > - > client: refuse to display or use document he received. >=20 > On a unique brigade handled document, the ap_set_keepalive find the=20 > connection closed, so he don't put the r->chunked =3D 1 and it's working = fine. > The problem is only on multiple brigade handling document >=20 > To make my mod_mem_cache work, i did this ugly patch, removing the=20 > TE-header from headers stored in memory. > It was working, but with ugly method. >=20 > Why mod_proxy is deleting this Content-length header, i understand for=20 > the TE, because the setkeepalive and http_headers_filter compute this=20 > header, but why the content_lentgh is deleted ? > I removed the CL deleting line in the proxy_http.c code and it's now=20 > working well, but i understand this line may be usefull, so i will=20 > search how to resolve the problem better. >=20 > i hope you understand the problem, my english is not really good >=20 > regards, >=20 > Estrade Matthieu >=20 >=20 >=20 >=20 >=20 >=20 > __________________________________________________ > Modem offert : 150,92 euros rembours=E9s sur le Pack eXtense de Wanadoo != =20 > Haut d=E9bit =E0 partir de 30 euros/mois : http://www.ifrance.com/_reloc/= w