We have a application that generates PDF files dynamically and forces a download of a the file. This code was working without issue on a Windows Server 2008. From what I can tell it appears that IIS is forcing the Content-Length to a value of 749 while it should be 83233. I have tried setting that value in the application code and IIS ignores it completely.
- Microsoft's URL Rewrite is installed but there are no entries for this site
- I have disabled compression of static and dynamic content
- Via the application code I am trying to set the Content-Length header and also setting the X-Content-Length header to the same value. This is how I am sure that the value is being overwritten by IIS
- When I hit the same URL via the built in web server of ColdFusion the download works without issue. This is why I know this is a issue with IIS or the connector between IIS and ColdFusion.
Here is the response headers from the server
Response Headers
-------------------------------------------------------------
Connection: close
Content-Length: 749
Content-Type : application/pdf;charset=UTF-8
Date: Thu, 13 Nov 2014 03:36:03 GMT
Server: Microsoft-IIS/8.5
X-Content-Disposition: attachment;filename=LasVegas.pdf
X-Content-Length :83233
X-Powered-By :ASP.NET