[Zope] content-type weirdness

Dieter Maurer dieter@handshake.de
Sun, 3 Nov 2002 00:30:30 +0100


keo writes:
 > ....
 > yesterday i had a dtml method working fine, i pasted in another text, and
 > the content-type became application/octet-stream ...
When you do not set a "Content-Type" header explicitly,
then ZPublisher tries to guess one:

  When it sees binary data, it assumes "application/octet-stream".

  Otherwise, it assumes "text". When it sees an "<html>", it uses
  "text/html", otherwise "text/plain".

Usually, Zope objects, especially "File" objects set an explicit
"Content-Type", guessed when the object is created and modifyable
with the management interface.


Dieter