[Zope] Wrong mime type sent by Zope on every page

Martijn Pieters mj@digicool.com
Thu, 8 Jun 2000 19:33:47 +0200


On Thu, Jun 08, 2000 at 11:51:03AM -0400, Andrew Diller wrote:
> It was just brought to my attention that Zope (using Zserver) is sending the wrong MIME
> type of all its pages.
> 
> Here is the header from zope: (some lines have been cut)
> ------------------
> 
> HTTP/1.0 200 OK
> Server: Zope/Zope 2.1.6 (source release, python 1.5.2, linux2) ZServer/1.1b1
> Date: Thu, 08 Jun 2000 15:45:23 GMT
> Ms-Author-Via: DAV
> Content-Type: application/octet-stream
> Last-Modified: Thu, 8 Jun 2000 15:45:07 GMT
> 
> 
> Here is one from apache:
> -------------------------
> 
> HTTP/1.1 400 Bad Request
> Date: Thu, 08 Jun 2000 15:29:59 GMT
> Server: Apache/1.3.6 (Unix)
> Content-Type: text/html
> 
>  I want Zope to be sending text/html, as some browsers want to download the page rather
> than view it.

You probably did a 'HEAD' request, at which point Zope doesn't render the
page, but rather only acknowledges it's existence by returning above (bogus)
response. 

If you do a 'GET' on your Zope resource, it _will_ be called, at which point
Zope can determine what content type to send. Zope will guess the content type
for you, usually this is text/html, but you can use the How-To you mentioned
to tell Zope otherwise.

-- 
Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------