For a given response you have a choice of one (the file) or the other (the page), but not both.
There are generally two ways around this; one is to have a <meta> refresh tag, and the URL in that is for the file. The other (this is what Sourceforge does) is have a vanishingly small <iframe> in the page that uses the URL to the file as its src. Either way, that extra URL is the one that has the Content-Type:application/octet-stream header and the actual contents of the file.