What you do wrong is your second and third setHeader which overwrite the first one. in fact after the first setHeader you can't call it again, you have to 'manually' write the response, e.g.: <UNTESTED> ... <dtml-call "RESPONSE.write('Content-Type: text/plain\n\n')"> <dtml-call "RESPONSE.write('Dont forget the two linefeeds after the headers')"> ... </UNTESTED> bye, Jerome Alet