RESPONSE.Write question
I have been trying to get a test routine working that uses RESPONSE.write... without success: Here is the dtml code I have been using: <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')"> The 'wait' routine is a simple external method: import time def wait(self, secs): time.sleep(secs) return 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? Thanks for the help, Jonathan
On Tuesday 16 September 2003 01:54, Small Business Services wrote:
I have been trying to get a test routine working that uses RESPONSE.write... without success:
Here is the dtml code I have been using:
<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')">
You dont need the Transfer-Encoding lines, or the second Content-Type line. ZPublisher takes care of that for you. Im not sure if that is relevant to your problem.... -- Toby Dickenson
participants (2)
-
Small Business Services -
Toby Dickenson