> -----Original Message-----
> From: Dan L. Pierson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 08, 2000 3:47 PM
> To: Brian Lloyd
> Cc: 'Chris Withers'; Martijn Pieters; Andrew Diller; [EMAIL PROTECTED]
> Subject: RE: [Zope] Wrong mime type sent by Zope on every page
> Brian Lloyd writes:
>  > What if we change this to:
>  > 
>  >   if a 'content_type' attribute exists, it is used
>  > 
>  >   else if the object's id seems to have a file extension
>  >           (. in the id), try to use guess_content_type
>  > 
>  > >  else if there is a 'default_content_type' attribute, use that
>  > 
>  >   else fall back to the hated application/octet-stream 
>  >        (or, I've seen x-unknown-content-type used before,
>  >         but I don't know if this is really any better).
>  > 
>  > Then we could put a 'default_content_type' attribute in the 
>  > class of dtml documents and methods, which would take care of 
>  > the most common case. Thoughts?
> Sounds pretty good.  Setting 'default_content_type' can then be
> another item in the unwritten Guide to Writing a Zope Product.

That's right - I expect that it could be useful for a few products. 
I can see XMLDocuments having a default of 'text/xml', but I suspect
that a lot of products won't really have to care. Things that have 
no real similarity to conventional "pages" (like database connection 
objects, etc.) are probably useless to a robot that works with "pages"
anyway, so they are better off sending a default non-committal 
response like "application/octet-stream".

Brian Lloyd        [EMAIL PROTECTED]
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com 

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to