Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 61538 invoked by uid 500); 21 Apr 2003 16:18:51 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 61523 invoked from network); 21 Apr 2003 16:18:50 -0000 Received: from host194-68.pool80116.interbusiness.it (HELO linux.local) (80.116.68.194) by daedalus.apache.org with SMTP; 21 Apr 2003 16:18:50 -0000 Received: from apache.org (localhost [127.0.0.1]) by linux.local (Postfix) with ESMTP id 7F69D84D38 for ; Mon, 21 Apr 2003 18:18:51 +0200 (CEST) Message-ID: <3EA419EB.5020300@apache.org> Date: Mon, 21 Apr 2003 18:18:51 +0200 From: Gianugo Rabellino User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Last-Modified and If-Modified-Since on pipelines References: <3EA1ACB5.6090503@pcextremist.com> In-Reply-To: <3EA1ACB5.6090503@pcextremist.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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