Internet Explorer cannot download file


I had a report recently from a client that they couldn’t download a file from one of our servers using Internet Explorer 7:

The message they got was:

Internet Explorer cannot download [filename] from [sitename]

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

I knew that the site and file were both available and a bit of hunting around I was reminded that IE used to have issues with Gzip encoding in the past – but I presumed that it was a thing of the past.

I also noticed that when downloading the file Firefox would not show a progress bar but would instead show a “indeterminate progress” bar.

Looking at the headers the it turned out that there was no Content-Length header but there was a header as follows:

Transfer-Encoding: chunked

The transfer encoding chunked allows the server so start sending the file before if has completely compressed it – but was not playing nice with IE7.

To fix this I added some more exclusions to my mod_gzip rules to not zip some particular file types.


#Compress eveything that is not already well compressed
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI
.(?:gif|jpe?g|png|mp3|air|exe|zip)$ no-gzip dont-vary

Now its working a treat. It would also be possible to do this only for IE – but most of the files we use on this are already well compressed to gzip compression doesn’t help too much anyway.

Cheers,
Mark

Related Content


This post was posted in , , by on