Link to home
Start Free TrialLog in
Avatar of jtreher
jtreher

asked on

Firefox giving me firefox application/octet-stream for my 404 errors

Hello there,

Here is what I want to do ultimately.

www.xxx.com/303

That 303 is goes to a custom 404 error page and the error page checks to see what the 303 is. If it is a number it sends it deep within the site to a page that handles these numbers for a database.

Now, Internet Explorer interpreted my coldfusion template as being a text file and displayed all the text. Firefox give me the firefox application/octet-stream do you want to open error.

So, what I did was have my custom 404 error page simply redirect using javascript to another coldfusion template.

This works fine in Internet explorer all clean and dandy.

However, any page that mozilla/firefox/netscape would go to gets the "do you want to open or save the file" of type firefox application/octet-stream

If I add an .htm to the end of the 303 it says "do you want to open or save the file" of type .htm

It seems like firefox won't even accept any redirect page for whatever reason unless it is plain an simple.

Basically, I'm thinking this is a security protection in these browsers that I can't get around, but I don't know.

Thanks for your help!
Avatar of GrandSchtroumpf
GrandSchtroumpf

It's a problem with mime types.
Instead of doing a redirection, you should use some coldfusion code to force the content-type to be "text/html".
I don't know the exact sytax though.
Avatar of jtreher

ASKER

Yes, I have actually read that Firefox sticks to some standards whenever it comes to mime types. Perhaps this needs to go to Coldfusion board?

I thought that if it wasn't even getting coldfusion to process the template, i.e. a 303 without a cfm extension wouldn't call up the CF server.
First of all, i don't understand what you want to use the error404 page for... there are tools for url rewriting if that's whay you are trying to acheive.

I found the docs about specifying a content-type in coldfusion:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p56.htm
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-a17.htm
Avatar of jtreher

ASKER

The problem with the URL writing tools is that they all rewrite the query string as slashes where as I just want the ID after the slash. Plus, our org has a URL scan that prevents most of them from working properly.

Other than that, say that a user did indeed enter into the page incorrectly by typing in one of those URLs that lead to nothing, well, they get Firefoxes message to download the octet stream!
ASKER CERTIFIED SOLUTION
Avatar of GrandSchtroumpf
GrandSchtroumpf

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jtreher

ASKER

Actually we are using IIS. I've found that a 404 to CFM template give a coldfusion error. From another experts exchange question (not mine) I've found that a setting in IIS needs to be changed. However, I don't know if this is affecting me or not.

Hold off on the responses until I try a few things.

Thanks for the help!
Avatar of jtreher

ASKER

I'm still working on this, but the head webmaster is out on vacation, therefore, I am stuck waiting for her to get back and approve IIS changes