RE: [Zope] REQUEST.setHeader doesn't seem to work?

2005-08-12 Thread Aaron Bauman
Have you played w/ the capitalization of content-type in your call to
setHeader?
-
Aaron Bauman
http://www.gaycenter.org


-Original Message-
From: Yuan HOng [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 11, 2005 1:57 PM
To: Zope@zope.org
Subject: [Zope] REQUEST.setHeader doesn't seem to work?

Hi,

I have a dtml file on FSDV which should return a file in text/plain format.
The dtml method starts with:

dtml-call expr=RESPONSE.setHeader('content-type', 'text/plain') ... some
content ...

However, when I use 'curl -I' to check which Content-Type header is
returned, I find it is still 'text/html', despite the call to setHeader.

Where could the problem lie? I am using Zope 2.7.6, with Apache configured
as frontend (with rewrite enabled). Could it be caused by Apache?

--
Hong Yuan

大管家网上建材超市
www.homemaster.cn




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] REQUEST.setHeader doesn't seem to work?

2005-08-12 Thread Dieter Maurer
Yuan HOng wrote at 2005-8-12 01:57 +0800:
I have a dtml file on FSDV which should return a file in text/plain
format. The dtml method starts with:

dtml-call expr=RESPONSE.setHeader('content-type', 'text/plain')
... some content ...

We use setHeader to set the content-type to text/css -- and
this works.

It would be surprising when text/css would work but text/plain not.

 ...
Where could the problem lie?

Good questions.

I am using Zope 2.7.6, with Apache
configured as frontend (with rewrite enabled). Could it be caused by
Apache?

Unlikely.

You can find out when you access Zope directly (avoiding Apache).
It the content type then correct?

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )