Firefox doesn't like text/plain 404 page

Feb 17, 2009 at 8:11 PM
I'm running into a problem running this solution in Firefox. If the URL has a file type extension at the end (like *.aspx, etc.), it works fine. But if it doesn't, such as when a type a directory name (www.mysite.com/Pages/foo), Firefox will actually display the HTML code itself on screen as plain text. instead of actually rendering it.

Looking more deeply into the issue, it turns out that this is because SharePoint sets the content type on those HTTP responses to "text/plain", which Firefox will always render as plain text. I assume IE must just look at the code, figure out that it's HTML, and decide to render it anyway. Really, though, this should have a content type of text/html. Does anyone have a good suggestion on how to change the content type on the 404 HTTP response in SharePoint?
Feb 17, 2009 at 9:37 PM
Scratch that. Turns out I just had an invisible ASCII character in the HTML that was messing things up.