httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject Re: mod_cache and multiple brigade
Date Fri, 15 Nov 2002 21:00:10 GMT
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,
> 
> i will quickly draw the problem i found 1 month ago:
> 
> When i am with apache + mod_proxy + mod_cache
> client --> reverse_proxy_cache --> backend.
> 
> when the client ask for a document which will be handled with multiple 
> brigade, the first time when mod_cache is caching the document, the 
> client browser is able to display the document.
> When the client ask again the document, mod_cache serve it from cache 
> and the client browser refuse to display it.
> 
> I found it was because the client browser received Content-Length header 
> and Transfer-Encoding=chunked header at the same time.
> I put debug in mod_proxy and mod_cache, and i found:
> 
> when the backend answer the first request to multiple brigade handled 
> document:
> 
> backend
> -
> mod_proxy: content_length=size, no transfer-encoding headers and 
> r->chunked =0.
> mod_proxy: delete content-length and Transfer-encoding headers.
> http_protocol.c: ap_set_keepalive don't find CL or TE headers so: 
> r->chunked=0 at beginning, r->chunked =1 when ending.
> http_protocol.c: ap_http_header_filter find r->chunked=1 so: add header 
> "Transfer-Encoding"=chunked
> mod_cache: find Transfer-Encoding=chunked headers and store it in memory.
> mod_cache: know the length of data he stored in memory and and the CL 
> header with length of data
> -
> client
> 
> When the backend answer the second request to multiple brigade handled 
> document:
> 
> rp+cache
> -
> mod_cache:cache_out:read_ headers: read headers from what he stored in 
> memory
> mod_cache:cache_out: send the two headers, CL and TE
> -
> client: refuse to display or use document he received.
> 
> On a unique brigade handled document, the ap_set_keepalive find the 
> connection closed, so he don't put the r->chunked = 1 and it's working fine.
> The problem is only on multiple brigade handling document
> 
> To make my mod_mem_cache work, i did this ugly patch, removing the 
> TE-header from headers stored in memory.
> It was working, but with ugly method.
> 
> Why mod_proxy is deleting this Content-length header, i understand for 
> the TE, because the setkeepalive and http_headers_filter compute this 
> header, but why the content_lentgh is deleted ?
> I removed the CL deleting line in the proxy_http.c code and it's now 
> working well, but i understand this line may be usefull, so i will 
> search how to resolve the problem better.
> 
> i hope you understand the problem, my english is not really good
> 
> regards,
> 
> Estrade Matthieu
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! 
> Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w



Mime
View raw message