Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 54970 invoked by uid 500); 20 Apr 2003 10:19:06 -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 54952 invoked from network); 20 Apr 2003 10:19:05 -0000 Received: from ny3.fastmail.fm (HELO smtp.us.messagingengine.com) (66.111.4.4) by daedalus.apache.org with SMTP; 20 Apr 2003 10:19:05 -0000 Received: from www.fastmail.fm (server1.internal [10.202.2.132]) by server3.messagingengine.com (Postfix) with ESMTP id BC82B59788 for ; Sun, 20 Apr 2003 06:19:18 -0400 (EDT) Received: from 127.0.0.1 ([127.0.0.1] helo=www.fastmail.fm) by messagingengine.com with SMTP; Sun, 20 Apr 2003 06:19:18 -0400 X-Epoch: 1050833958 X-Sasl-enc: LzuMX5P7JekHbo3++1WK6Q Received: from charya (async236-1.nas.onetel.net.uk [212.67.97.236]) by www.fastmail.fm (Postfix) with ESMTP id 8CE1C323CF for ; Sun, 20 Apr 2003 06:19:15 -0400 (EDT) From: "Upayavira" To: cocoon-dev@xml.apache.org Date: Sun, 20 Apr 2003 11:18:38 +0100 MIME-Version: 1.0 Subject: Re: Last-Modified and If-Modified-Since on pipelines Message-ID: <3EA2820E.1975.7D108A4@localhost> Priority: normal In-reply-to: <3EA1ACB5.6090503@pcextremist.com> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 19 Apr 2003 at 13:08, 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. Curious - but I was starting to look into how to do exactly the same thing just before getting your message. I'd be very interested in getting 'ifModifiedSince' behaviour out of a pipeline, as it'll mean that the CLI can find out whether to generate a page or not. Unfortunately, I go on holiday in 6 hours time, so I won't get a chance to try your patch out for three weeks :-( Regards, Upayavira