Stephan Richter  <[EMAIL PROTECTED]> wrote:
> You can do this by directly writing to the response and not returning 
> anything 
> through the executing method:
> class View(object):
>   def __call__(self):
>     response = self.request.response
>     # ... set all necessary headers
>     response.write(data)
>    sleep(10)
>     response.write(data)
>    sleep(10)
>    response.write(data)

Note that, when you do that (and it is also true for Zope 2), you start
sending data directly to the browser before the end of the transaction,
so if later on a ConflictError then occurs and the request has to be
retried from scratch, the user will already have received data on its
socket. I'm not even sure what the zserver code is able to do (send
further data after the one from the aborted transaction ? fail ?).


Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   [EMAIL PROTECTED]
Zope3-users mailing list

Reply via email to