[Zope] Content-Disposition is driving me batty

Andreas Jung lists at zopyx.com
Thu Aug 17 10:51:33 EDT 2006



--On 16. August 2006 17:28:00 -0500 Kirk Strauser <kirk at daycos.com> wrote:

> I have a Python script that transmits a file to the user.  An excerpt:
>
>     if not skipctypeheader:
>         # Set the content type if one is defined for the file
>         ctype = file.getProperty('content_type', d=None)
>         if ctype:
>             RESPONSE.setHeader('Content-Type', ctype)
>
>     RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' %
> filename)

I remember having had similar problems with IE and downloading files. In 
general we use only content-disposition: attachment for IE vs. 
content-disposition: inline for all other browsers. After that change we 
haven't had
any bug reports from IE users.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060817/19d0d1be/attachment.bin


More information about the Zope mailing list