[Zope] RESPONSE.Write question
Gabriel Genellina
gagenellina at softlab.com.ar
Tue Sep 16 06:00:00 EDT 2003
At 15/9/2003 22:29, you wrote:
><dtml-call "RESPONSE.setHeader('Transfer-Encoding', 'chunked')">
><dtml-call "RESPONSE.setHeader('Content-Type', 'text/plain')">
><dtml-call "RESPONSE.write('Starting')">
>
><dtml-call "wait(5)">
>
><dtml-call "RESPONSE.setHeader('Transfer-Encoding', 'chunked')">
><dtml-call "RESPONSE.setHeader('Content-Type', 'text/plain')">
><dtml-call "RESPONSE.write('\n\nDone')">
>
>
>What I expected to see was the word 'Started' displayed in my browser,
>followed by a 5 second delay, and then see the word 'Done' displayed.
>
>What I get is a 5 second delay and then both 'Started' and 'Done" appear at
>the same time.
>
>Any ideas as to what I am doing wrong?
Just ensure that you finish each chunk with \n
A call to flush() may be useful too:
<dtml-call "RESPONSE.write('Starting\n')">
<dtml-call "RESPONSE.flush()">
That should work fine. BTW, there is no need to set those headers more than
once.
Gabriel Genellina
Softlab SRL
More information about the Zope
mailing list