IIS website is sending multiple content-type headers for zip files

Posted by frankadelic on Stack Overflow See other posts from Stack Overflow or by frankadelic
Published on 2009-04-09T21:10:43Z Indexed on 2010/06/13 10:02 UTC
Read the original article Hit count: 381

Filed under:
|
|
|
|

We have a problem with an IIS5 server.

When certain users/browsers click to download .zip files, binary gibberish text sometimes renders in the browser window. The desired behavior is for the file to either download or open with the associated zip application.

Initially, we suspected that the wrong content-type header was set on the file. The IIS tech confirmed that .zip files were being served by IIS with the mime-type "application/x-zip-compressed".

However, an inspection of the HTTP packets using Wireshark reveals that requests for zip files return two Content-Type headers.

  • Content-Type: text/html; charset=UTF-8
  • Content-Type: application/x-zip-compressed

Any idea why IIS is sending two content-type headers? This doesn't happen for regular HTML or images files. It does happen with ZIP and PDF.

Is there a particular place we can ask the IIS tech to look? Or is there a configuration file we can examine?

© Stack Overflow or respective owner

Related posts about iis

Related posts about zip