
On 2010-03-16 02:59 -0400 (Tue), Gregory Collins wrote:
Curt Sampson
writes: I think you're confusing content-encoding and transfer-encoding here.
Yup. Oops, sorry.
Another approach would be to have interface library buffer the response as it's being generated and, when it's complete, calculate the content length and pass it on to the web server.
This breaks "being able to stream in O(1) space", so it's out. Concrete examples: comet, internet radio, etc.
Having *the option* to do this for efficiency does not break streaming. Only forcing everyone to use this would do that. My point is, if you provide only one way of doing things, you can end up in a situation where some applications will still work, but be a lot more inefficient than they would be otherwise.
By "interface layer" for the purposes of this conversation I mean roughly the level of abstraction that Hack/WAI/WSGI/Rack/Java Servlets are inhabiting.
Ah, well this is what I'm saying: that should ideally be part of a
standalone library that translates between the web applicaton and the
protocol you use to talk to the server.
cjs
--
Curt Sampson