[Zope3-dev] RFC: Make HTTP streaming of large data simpler
Jim Fulton
jim at zope.com
Tue Dec 6 08:55:56 EST 2005
Interesting. I wasn't aware of this in Z2. Zope 3 definately
doesn't have this. Sindnei, have you verified that this actially
works in Z2? I didn't think the Zope 2 publisher actually started
propducing output until the request was finished.
Jim
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?
>
>
>>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.
>
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list