[Zope3-dev] RFC: Make HTTP streaming of large data simpler

Paul Winkler pw_lists at slinkp.com
Mon Dec 5 13:24:54 EST 2005


On Mon, Dec 05, 2005 at 11:13:31AM -0500, Jim Fulton wrote:
> BTW, your implementation also doesn't work because it doesn't
> set the content length.

Speaking of which, I'd love to see a way to make this work for
situations where you can't precompute a correct content length because
e.g. you're building a lot of data on the fly but you still want to
start streaming it as early as possible.
In this case, the HTTP spec says that you should NOT set the
content-length header but you must close the channel to signal "end of
data".  Or at least that's what Dieter says it says :-)
http://mail.zope.org/pipermail/zope/2005-November/162714.html

Apparently, according to Dieter, Zope 2 doesn't let you use this idiom;
does zope 3?  (I've very briefly looked at the Zope 2 code in medusa,
and I can't quite tell if Dieter is correct - there seems to be some
support for the "chunked" transfer coding, which should do the job, but
I'm not sure if/how one can currently take advantage of it.)

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope3-dev mailing list