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

Sidnei da Silva sidnei at enfoldsystems.com
Mon Dec 5 14:18:15 EST 2005


On Mon, Dec 05, 2005 at 01:58:21PM -0500, Paul Winkler wrote:
| 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?

Dunno.

| > 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.

That's right.

| > 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.

Np.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com


More information about the Zope3-dev mailing list