tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "verlag.preisser@t-online.de" <verlag.preis...@t-online.de>
Subject Re: IE 8 and before refusing to download files (I hate IE)
Date Mon, 03 Jun 2013 18:28:20 GMT
Hi,

-----Original-Nachricht-----
> Von: Jeffrey Janner <Jeffrey.Janner@PolyDyne.com>
> An: 'Tomcat Users List' <users@tomcat.apache.org>

> Ran into an interesting problem today.  It seems that IE8 and before
> no longer likes how we are sending BLOB files.
> 
> Worked last week as far as we can tell.  Works fine for IE9+ and other
> browsers, but IE8 is suddenly giving us an error message, as though it
> is ignoring the response headers.
> 
> I'm not going to completely rule out the possibility it is in our code
> somewhere, but we haven't found it yet.  We did also upgrade out app
> over the weekend, but the problem didn't show up in our test
> environment (as far as we can tell).
> 
> Here is the relevant code:
> 
[...]
> 
> Works great if the MimeType is text/html, but anything else generates
> an error.
> 
> The getContent routine reads from the BLOB and copies it to the
> response output stream.
> 
> None of this code has changed, and the access log shows a 200
> response and the full number of bytes of the file.
> 
> Anybody have any ideas?
> 
> Server1 specs: Tomcat 6.0.33/Java 1.6.0_33/Windows 2003 SP2
> Server2 specs: Tomcat 6.0.36/Java 1.6.0_34/Windows 2008 R2/SP1


can you give an example of the actual HTTP response headers that are sent to the client?

I just tested that the following response works with IE8 on WinXP and IE10 using its IE8-Mode
on WIndows 8:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/x-zip-compressed
Server: Microsoft-IIS/7.5
Content-Disposition: attachment; filename=Portal.zip
Date: Mon, 03 Jun 2013 18:14:14 GMT

[...]

This is generated by a Servlet on Tomcat 7.0.40 that sets the Content-Type and Content-Disposition
headers and then writes bytes to the respone's OutputStream (the response is served by IIS/7.5
using ISAPI Redirector). For Content-Disposition, I'm using javax.mail.internet.ContentDisposition
which should automatically add necessary escaping and quoting to the "filename:" part.

I also tested with IE10's IE7-Mode that is used when activating Compatibility View and no
X-UA-Compatible header is present that tells IE to use it's highest browser mode (like "X-UA-Compatible:
IE=Edge").

(As an aside, for my websites I don't support any IE below IE9... ;-)  However, I use the
"X-UA-Compatible: IE=Edge" header to prevent IE to use the compatibility mode, which can happen
if Microsoft suddenly decides to add your site to its "compatibility view list", or sometimes
if IE is embedded as ActiveX control etc...)


Regards,
Konstantin Prei├čer



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message