[Zope] How to set MIME types in zope

Andreas Jung lists at zopyx.com
Thu Dec 28 02:48:06 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- --On 27. Dezember 2006 16:11:15 -0500 Sudesh soni 
<sudesh.soni at ebusinessware.com> wrote:

> Forgive my ignorance, I have a question.
>
> If I set the 'security' setting  in internet options :
>
> 'Open files based on content not file extension'   to Disable
>
> and the try to access a page rendered by python script then I get the
> following javascript error on the page:
>
> "This content might not be displayed properly.The file was restricted
> because the content does'nt match its security information"
>
> But if I enable the settings in Internet Options-->Security, ie  'Open
> files based on content not file extension'  then the above error does not
> occur
>
> There seems a conflict between the extension type set by Zope and the
> MIME in Internet Explorer as it is seeing it has a script.
>
> How can I resolve the error , keeping the property  'Open files based on
> content not file extension'   to Disable  ?
>
> Do I have to set the MIME types in every file or it could be set at a
> single location in some zope configuration file?
>

IE's behavior is stupid and broken in many way. Not only different IE 
versions behave differently but also it depends on the Windows version.
One of the stupid errors I've encountered lately: you write a script to
generate a CSV file, you set the proper mime-type however IE does not 
recognize the response a CSV as long the URL *including* the query
string does not end with '.csv'.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk3a3CJIWIbr9KYwRAqmzAJsH0ZmqRyoI+oRguOFiiwa9ET9QrgCeMebc
J/HPU6I/N6CgmLKPNnKdOvc=
=Ks6D
-----END PGP SIGNATURE-----



More information about the Zope mailing list