in reply to Sending MIME type headers not forcing desired behaviour.

Without a custom browser or extension on the user side, I'd call it expecting the impossible. HTTP allows you to tell the browser what you are sending it, and browsers come with the ability to open external apps to open documents that they _can't_handle_natively_. The browser _can_ handle the html here, well enough so to see through your HTTP Header ruse and recognize that you are sending html (Most likely, it's the '.htm' that's tipping it off -- change that and you'll have a better chance, but no guarantees.) Perhaps there's some file extension or mime-type that describes a powerpoint-specific html file?
  • Comment on Re: Sneding MIME type headers not forcing desired behaviour.

Replies are listed 'Best First'.
Re^2: Sneding MIME type headers not forcing desired behaviour.
by jhourcle (Prior) on Apr 06, 2005 at 03:32 UTC

    Actually, you'd be surprised at what settings some browsers will let you make. It's a couple of days late for April Fool's now, but I know earlier versions of IE let you specify Netscape as the handler for HTML.

    (I'd say this was somewhere near the IE3 days, just based on where I was working, when I did this for April fool's to my co-workers computer)

    Anyway, I'd suggest looking at Microsoft's documentation on MIME type detection. Unfortunately, in their efforts to 'fix' badly written CGIs so they work in IE (giving the bad programmers less reason to fix their sloppy code), they've made it so that there are times when the content-type headers are ignored. (it's much like the 'fix' that allowed FrontPage and MS Word's 'Save as HTML' to keep generating crappy code, that looked just fine ... so long as you were using IE).

    Anyway, test with some other browsers, and see if it's just an IE-ism. If it's affecting other browsers too, dump the full headers, and see if there's anything in there that might be bad (like two Content-type headers).