[Zope] Re: MSIE 6 not opening MIME attachments

Jim Kutter jim at ebizq.net
Mon Jan 12 11:47:02 EST 2004


Sorry folks, I figured it out.

Turns out I was sending a Cache Control header elsewhere in the code.

That was preventing IE from saving the file in it's temp internet files folder, and that's why "open" didn't open squat - the file never got cached... In hindsight it makes perfect sense...

Thanks for the pointers, if anyone else runs into this, here's the page that tipped me off to the problem: http://support.microsoft.com/default.aspx?scid=kb;en-us;243717&Product=ie

-jim


-----Original Message-----
From: Jim Kutter 
Sent: Monday, January 12, 2004 10:55 AM
To: Thierry Florac; zope at zope.org
Subject: RE: [Zope] Re: MSIE 6 not opening MIME attachments


Thanks for the info regarding the nature of the bug. 

Unfortunately I can't change the URL for a few reasons.

Also changing the disposition to "inline" from "attachment", didn't help either. I think the only option left is to post a warning to IE users...

-jim

-----Original Message-----
From: Thierry Florac [mailto:thierry.florac at onf.fr] 
Sent: Monday, January 12, 2004 10:15 AM
To: Jim Kutter; Gilles Lenfant; zope at zope.org
Subject: Re: [Zope] Re: MSIE 6 not opening MIME attachments


On Monday 12 January 2004 16:03, Jim Kutter wrote:
> Thanks, but still no luck.

Hi,

IE only is responsible of this bug : if you specify a "filename" parameter in 
the "Content-Disposition" header, then IE doesn't open the file (you may have 
the same kind of problem with PDF or DOC files).
This problem which appeared in IE 5.0 disappeared with IE 5.5 and came back in 
IE 6.
Just remove the "filename" option and everything should be OK (but you should 
keep a good extension in your URL, otherwise it should fail also, depending 
on your client OS configuration).


  Thierry


> -----Original Message-----
> From: Gilles Lenfant [mailto:glenfant at bigfoot.com]
> Sent: Thursday, January 09, 2003 7:34 PM
> To: zope at zope.org
> Subject: [Zope] Re: MSIE 6 not opening MIME attachments
>
> > "Jim Kutter" <jim at ebizq.net> a écrit dans le message de
>
> news:EBA064F73335E9479B473032FE5CBCEBCE0975 at cmburns.ebizq.net...
>
> > I'm trying to send a CSV via a python script. My problem is in IE 6, if
> > the user clicks on "Open" instead of save from the dialog that appears,
> > Excel will launch, but not find the file in the Temporary Internet Files
> > folder. Clicking on "Save" then opening the file manually works just
> > fine.
> >
> > Is this a problem with my response headers or an IE bug?
> >
> > Here are the headers I'm sending:
> >
> > response.setHeader('Content-Type', 'text/csv')
> > response.setHeader('Content-Length', len(printed))
> > response.setHeader('Content-Disposition', 'attachment; filename=%s' %
> > filename)
> >
> > return printed
>
> Hi Jim,
>
> This works for me...
>
> RESPONSE.setHeader('Content-Type', 'text/comma-separated-values;
> charset=ISO-8859-1')
> RESPONSE.setHeader('Content-Disposition', 'attachement;
> filename=sometable.csv')
>
> ... even when omiting 'Content-Length' header.
>
> Hope this helps
>
> --
> Gilles


_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )



More information about the Zope mailing list