cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierpaolo Fumagalli <>
Subject Re: Content-length
Date Mon, 24 Jan 2000 06:40:51 GMT
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.


-          P              I              E              R          -
stable structure erected over water to allow the docking of seacraft
<>    <>
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <> --------------------

View raw message