When downloading a file from an IIS6-hosted ASP.NET MVC 3 application, the content-length
header is not set for .exe files.
MIME-types appear to be correctly set. ( .exe
is application/octet-stream
). Static content compression is disabled.
As far as I can tell, this problem is specific to .exe
files. .zip
works fine.
Suggestions?
Update
Here are the headers that are being sent:
Accept-Ranges:bytes
Cache-Control:max-age=86400
Compression-Control:whitespace
Content-Encoding:gzip
Content-Location:http://...../someFile.exe
Content-Type:application/octet-stream
Date:Wed, 28 Aug 2013 15:45:52 GMT
ETag:"5397aeeb6e4ace1:0"
Last-Modified:Mon, 06 May 2013 15:32:30 GMT
Transfer-Encoding:chunked
Vary:Accept-Encoding
Turned out we had an ISAPI filter running that was stripping out some headers, including this one.
Disabling the filter fixed the problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.