I have a zip file being served by Apache with mod_gzip compression turned on. Everything is fine when the file is downloaded with Firefox. When downloaded with IE7 the zip file is corrupt. Any suggestions? Do I need to change the mime type for zip files or perhaps exclude zip files from gzip compression?
What MIME type are you sending along with the .zip file? I have had errors similar with dynamic download pages (such as download.php sending a file) and compression. When using something like application-zip and Content-Encoding: gzip, IE would not uncompress the file. I corrected this by using a MIME type of application/octet-stream, if I recall correctly.
That being said, you should probably exclude .zip from gzip compression anyway, since it's probably useless if not actually hurting performance.
This problem is a known issue with Internet Explorer 7 and 8. Those browsers do not handle correctly zip content type with gzip content encoding. The 8 release of IE has still some audience since it is the last release available on XP.
Enabling http compression on a zip is somewhat redundant, but it is technically valid. And in some cases, one may not have the choice to exclude zip from http compression, depending on technologies used.
So, if you want to enable a workaround on your web servers for users of Internet Explorer 7 or 8 to be able to get valid zip, as said in Microsoft KB, either disable http compression on zip content, or change the zip mime-type to octet-stream on your servers.
you should definitely exclude the zip file from gzip compression. There is no need in compressing already compressed content again. This is not only valid for zip files but also for jpg and so on.