We just had a pretty weird problem. Internet Explorer 8 decided to open some links as downloads instead of just navigating to the files as per usual. All normal browsers did not have this problem. I immediately checked the headers which revealed nothing out of the ordinary:
Server: Apache-Coyote/1.1 Cache-Control: public Expires: Thu, 12 Jul 2012 19:13:38 GMT Pragma: Thu, 12 Jul 2012 19:13:38 GMT Content-Disposition: inline; filename="Recipe_Details_Attachments.htm" Content-Type: text/html Content-Encoding: gzip Vary: Accept-Encoding Date: Tue, 29 Jun 2010 19:13:38 GMT Connection: close
The Content-Disposition: inline; part tells me that the browser should not open this as a download.
My coworker who i now owe 6 beers suggested that because of IE's stupidity it is looking at the entire Content-Disposition line, and doing substring matching on first 'attachment' and then 'inline'. He was correct. IE stupidly saw this line as basically Content-Disposition:attachment;
The fix was to change the filename to something that did not include 'attachments'.