cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabe Beged-Dov <>
Subject Re: Content-length
Date Tue, 25 Jan 2000 03:18:23 GMT
Nicolás Lichtmaier wrote:

> > You could have your buffer and eat it too if you were talking to
> > a HTTP/1.1 client since I assume you could use chunked transfer
> > coding. You could have your buffer set to 20K (or whatever your
> > adaptive algorithm determines) and send it out either as normal
> > or chunked depending on whether the content was done.
>  I didn't get what you said, but anyway, you don't speak HTTP, the webserver
> does. You can't "send a chunk".

The "have your buffer and eat it too" phrase was a play on "have
your cake and eat it too", i.e. the best of both worlds, full and

The "you" I was referring to is the Cocoon engine that is
managing the response object. I was thinking that in the
streaming scenario, there would be logic that would be buffering
the initial content up to a certain threshold. When this
threshold is passed, it would add a Transfer-Encoding header with
a value of "chunked" to the response. It would then wrap the
initial buffer and all subsequently filled buffers as chunks
which would be written to the output stream. If the threshold is
not hit, then a Content-Length header would be added and the
"raw" content would be written to the stream. 

Cordially from Corvallis,

Gabe Beged-Dov


View raw message