Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 62377 invoked from network); 24 Jan 2000 06:40:12 -0000 Received: from dnai-216-15-97-206.cust.dnai.com (HELO kali.betaversion.org) (216.15.97.206) by 63.211.145.10 with SMTP; 24 Jan 2000 06:40:12 -0000 Received: from apache.org(c163581-b.smateo1.sfba.home.com[24.12.46.58]) (2802 bytes) by kali.betaversion.org via smail with P:esmtp/R:internet/T:smtp (sender: ) id for ; Sun, 23 Jan 2000 22:40:10 -0800 (PST) (Smail-3.2.0.106 1999-Mar-31 #3 built 1999-Sep-21) Message-ID: <388BF3F3.47041081@apache.org> Date: Sun, 23 Jan 2000 22:40:51 -0800 From: Pierpaolo Fumagalli Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Content-length References: <3.0.32.20000123221819.01413440@pop.intergate.ca> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Tim Bray wrote: > > At 03:24 PM 1/23/00 -0300, Nicol�s Lichtmaier wrote: > > I like Cocoon. I think it might be the way all things should happen in the > >web. But to do that Cocoon must be as `web friendly' as posible, as static > >pages are. e.g. it must send the proper HTTP headers in order to cooperate > >with caches and other HTTP software. From reading the sources it seems very > >easy to add the Content-length header. The whole content is first stored in > >a String (in Engine.handle()). It would be a matter of sending the > >string.length();. This could be done now... is there any reason this is not > >being done? > > I don't think Cocoon should get in the habit of sending Content-length. > If you don't send it, or send a value of 0, browsers sensibly wait until > they get EOF. If you accidentally send the *wrong* number, bad things > happen. The fact that Cocoon currently stores the whole output page > as a string is something that you might want to change later; there are > a huge number of ouput-caching and lazy-evaluation strategies that > mean you probably can't know in advance what the Content-length is. > > So.... if were still possible to put something in Cocoon that says > > if (iReallyAbsolutelyForSureKnowWithoutErrorHowManyBytesImGoingToSend) > { > sendContentLengthHeader() > } > > and it cost very little to do so, I'd still have to ask, "why bother"? > -Tim I think we can be Really Absolutely For Sure Know Without Error How Many Bytes We Are Going To Send :) only when the page doesn't need to be regenearated, and so when it's fully cached. In that case, and only in that case, I'd like to see a Content-Length, allowing us to get keepalive connections over HTTP. Pier -- -------------------------------------------------------------------- - P I E R - stable structure erected over water to allow the docking of seacraft -------------------------------------------------------------------- - ApacheCON Y2K: Come to the official Apache developers conference - -------------------- --------------------