EllisLab/CodeIgniter — pull request #1092 by narfbg (2012-02-29 12:21:15+00:00)
Title: Add an optional set_mime parameter to force_download()

The function name itself implies that a download would be *forced*, but most browsers would not initiate a download if there's a browser plugin (such as a PDF reader or many video players) or if the file is an image. They would instead handle the content internally and not even ask the user wether to download the file or not. Setting an `application/octet-stream` content type will force the browser to show the Open with/Save dialog.
This is why even though this is new functionality, it should be the default behavior and it's kept as an option to allow sending the correct MIME type, in case that somebody needs that.

Also did some minor clean-up and fixed a possible bug with IE introduced in #957, where the Pragma header would be sent twice.