cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@apache.org>
Subject Re: Last-Modified and If-Modified-Since on pipelines
Date Mon, 21 Apr 2003 16:18:51 GMT
Miles Elam wrote:
> I added a last modified (long value) property to the CachedResponse 
> object so that the environment and servlet engine could respond to 
> If-Modified-Since headers and reduce network traffic.  The idea being 
> that the cached response, a byte array, comprised the last valid 
> timestamp for the entire matcher/request.  It doesn't apply to any 
> specific resource in the pipelines and matchers and so has no component 
> author-accessible methods and is immutable.
> 
> I've only tested it on the default front welcome page (simple 
> XML->XSLT->XHTML) with wget, but it seems to work just fine.  The first 
> access doesn't set Last-Modified just as it doesn't set Content-Length;  
> The stream wasn't buffered on the first access.  However, all subsequent 
> accesses have the header, and if the client sends an If-Modified-Since 
> header, a 304 with no body is sent correctly.  Changing any piece of the 
> pipeline correctly invalidated the cache and regenerated the 
> CachedResponse object (with a new timestamp), so no regressions in that 
> case that I can see.
> 
> Simple patches but one that folks behind a proxy or limited bandwidth 
> line might appreciate.

Cool work, Miles! This would be one step further towards real 
proxy-friendliness of Cocoon: once Etag support is there we would be 
really close to proxy nirvana (not only for people behind a proxy but 
also for Cocoon used with an http accelerator in front of it). Could you 
please submit your patch to Bugzilla so that it doesn't get lost? I plan 
to review and commit it shortly (and will possibly need your help in 
testing and documenting it), but have no CVS access ATM.

Thanks for this contribution,

-- 
Gianugo Rabellino
Pro-netics s.r.l.
http://www.pro-netics.com


Mime
View raw message