[Zope] RESPONSE.setHeader Command

Tom Cameron tom@ihsa.com.au
Tue, 10 Apr 2001 10:30:00 +1000


I am running Zope 2.3.0 on Apache 1.3.14 on FreeBSD 4.0

I have been concentrating on getting my zope site registered in the search
engines and I have noticed some interesting behaviour.

I was originally using Roxen + Zope and Altavista and (many of the major
search engines) were rejecting my site with a response like 'An error
occured while visiting your site' - of course they gave not detail of the
error.

I figured it may be Roxen so I changed to Apache, this helped with
Altavista, but still other engines report errors.

It is most definitely not a '404 NotFound' error as I am certian the server
is ok. So I have done some more testing.

I have been looking at the headers which look like:

HTTP/1.1 200 OK
Date: Tue, 10 Apr 2001 00:23:09 GMT
Server: Apache/1.3.14 (Unix)
X-Powered-By: Zope (www.zope.org), Python (www.python.org)
Content-Length: 24801
Connection: close
Content-Type: text/html

I then emailed a site that has a .pl script to read headers (which was
giving me error also) and found that their site did not like the
'X-Powered-By:' line and simply reported an error.

I suspect that this may be the case with other search engines, but I can't
tell for sure. My hope is to remove this line and see if it helps, but this
is where my problem lies.

How do I get rid of this line without modifying the HTTPResponse.py file? I
tried to use the RESPONSE.setHeader command, but had no luck at all. I was
able to append values to the header line, but I could not remove it or
change it.

The API documentation says that the value should be changed if you give a
new value, but I have found this not to be the case. In fact the setHeader
command is working much more like the appendHeader command for me.

Does anybody have any idea?

Tom


----------------------------------------------------------------------
Tom Cameron                                      CELL: +61 414 553 212
Mooball.com Pty Ltd                      VOICE MAIL: +61 (7) 3319-6074
PO Box 1158                                  FAX-AU: +61 (7) 3319-6074
Fortitude Valley, Brisbane, QLD              FAX-US: +1 (801) 516-8937
Australia                                              tom@mooball.com
Time Zone GMT+10                                http://www.mooball.com
----------------------------------------------------------------------