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

Chris Withers chrisw@nipltd.com
Thu, 08 Jun 2000 20:20:32 +0100


Martijn Pieters wrote:
> But what if there are side effects to calling the document? What should
> happen? I don't want a counter to go up or anything just because a HEAD was
> called on the object.
> 
> This is not as black-and-white and simple an issue.

The web is an imperfect medium, but returning a junk content type isn't
good.
I don't know the answer to the sideeffects thing, but I would come down
on the site of 'if you expose something through the web, you should
expect to have it spidered...' but that's cause I value search engine
hits a lot.

The trick would be to set the content type when the object is created
and have it stored in the object, not computed for each request.

Would a property suffice for that?

Then, say, if you knew your DTML method was going to return plain text,
you could set the content-type property to text/plain. Thsi could be
returned in the head without having to evaluate the object to return the
head, which is a bit innefficient.

I'm sure that's possible and better than it is now, but at the absolute
least the junk should cover the most likely outcome, ie text/html
instead of application/octet-stream, which is possibly the worst one I
can think to choose ;-)

cheers,

Chris