title: Issue with File Download HTTP Headers in IE, when passed through nginx reverse proxy
body: <p><strong>Setup:</strong></p>
  
  <p>IIS7 serving ASP classic VB script code which generates a dynamic VSC page/file with headers to download.</p>
  
  <pre><code>Response.ContentType = "text/x-vCalendar"
  Response.Expires = -1
  Response.Buffer = True
  Response.Clear
  Response.AddHeader "Content-Disposition", "filename=" &amp; strFileName &amp; ".vcs;"
  Response.Write strFileContent
  </code></pre>
  
  <p>Our IIS7 serrvers are behind a nginx reverse proxy.  Everything is working fine, except this file download.  </p>
  
  <p><strong>Problem:</strong></p>
  
  <p>When using IE and going in through the reverse proxy (load balancer) the file is not downloading as a .vcs but wanting to download the .asp file/page.</p>
  
  <p>When using other browsers through the reverse proxy (load balancer) it works fine.</p>
  
  <p>When using IE and bypassing the reverse proxy (load balancer), going straight to the IIS server, it works fine.</p>
  
  <p><strong>Assumption:</strong></p>
  
  <p>Sounds like it's a HTTP header issue.  The only differences I could find in the responses were the additional response headers of:</p>
  
  <pre><code>Connection: keep-alive
  Vary: Accept-Encoding
  </code></pre>
  
  <p><strong>Header Responses:</strong></p>
  
  <pre><code>HTTP/1.1 200 OK
  Cache-Control: private
  Content-Length: 1431
  Content-Type: text/x-vCalendar
  Expires: Fri, 09 Jul 2010 13:26:38 GMT
  Server: Microsoft-IIS/7.5
  Content-Disposition: filename=2507541_16268.vcs;
  X-Powered-By: ASP.NET
  backend: iis1
  Date: Fri, 09 Jul 2010 13:27:37 GMT
  
  HTTP/1.1 200 OK                                                   
  Connection: keep-alive
  Vary: Accept-Encoding
  Cache-Control: private
  Content-Length: 1431
  Content-Type: text/x-vCalendar
  Expires: Fri, 09 Jul 2010 13:26:19 GMT
  Server: nginx
  Content-Disposition: filename=2507541_16268.vcs;
  X-Powered-By: ASP.NET
  backend: iis1
  Date: Fri, 09 Jul 2010 13:27:15 GMT
  </code></pre>
  
  <p><strong>Request</strong></p>
  
  <p>Is there any light anyone can shed on the issue?  </p>
  
  <p>nginx settings to change, or ASP code to add?</p>