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

Paul Winkler pw_lists at slinkp.com
Mon Dec 5 13:58:21 EST 2005


On Mon, Dec 05, 2005 at 04:31:03PM -0200, Sidnei da Silva wrote:
> There are a couple conditions that must be met for 'chunked' to work
> with Zope 2.

Cool. Does Z3 behave the same way?
 
> 1. A Content-Length header must not be set.
> 2. The request must be HTTP 1.1
> 3. You must be streaming
> 4. No 'Connection: close' header has been set during the request

Does "be streaming" mean something that isn't covered by the
other requirements?
... hmmm, (reading more code), do you mean that RESPONSE._streaming must
be true?  Aha, I see that RESPONSE.write() implicitly sets that flag.

> If all of that is met, then it works just fine. The signal for 'end of
> data' in chunked mode is '0\r\n\r\n', which Zope properly inserts when
> appropriate.

OK. Aha, I'm now looking at medusa/producers.py and I see that happens in
chunked_producer.  

Thanks for the info.

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope3-dev mailing list