[Zope] setHeader not working?!

Wolfram Kerber wk@gallileus.de
Thu, 22 Nov 2001 22:34:29 +0100


hi alex,

I bet setHeader is working just fine, you are just using the wrong method to
test it. 'HEAD' is handled differently than 'GET' and just returns
meta-informations without actually calling the document. Try using 'GET'
with telnet, then you should see the header.


----- Original Message -----
From: "alex" <alex@quad.com.ar>
To: <zope@zope.org>
Sent: Thursday, November 22, 2001 9:36 PM
Subject: [Zope] setHeader not working?!


> I've tried to use RESPONSE.setHeader('pragma','no-cache') on 2 zope boxes
> 2.4.1 python 2.1.1 (a linux and a win32) and none works
>
> I test it doing a lynx -head -dump http://myzopebox/myscript
> also tried:
> telnet myzopebox 80
> HEAD /myscript HTTP/1.0
>
> I dont see 'pragma' on the headers, any ideas what's wrong?
>
> I've tried it on python script:
> context.REQUEST.RESPONSE.setHeader('pragma','no-cache')
> return ''
>
> and also dtml
> <dtml-call "RESPONSE.setHeader('pragma','no-cache')">
>
> nothing works.
>
> any hints?
>
> thanks
> Alex
>