cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bray <>
Subject Re: Content-length
Date Mon, 24 Jan 2000 06:21:14 GMT
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)

and it cost very little to do so, I'd still have to ask, "why bother"?

View raw message