Handling of incorrect MIME types

Discussion of features in Mozilla Firefox
Post Reply
dtobias
Posts: 2098
Joined: November 9th, 2002, 3:35 pm
Location: Boca Raton, FL
Contact:

Re: Yup. A&Os.

Post by dtobias »

Conditional wrote:The comparison may not have been fair because I feel as though the attitude towards mis-MIME types has been unfair, and that was my point. There must be some way to determine the intended application for a document without breaking the Internet or exposing security risks.


This "Do What I Mean" thing is just what many of us hate so much about Microsoft products... they second-guess the user in what can sometimes be infuriating, or even dangerous, ways.

Under the standards, the file extensions found in URLs are completely irrelevant. I could save all my HTML files with ".gif" extensions, all my images with ".txt", and all my plain text files with ".zip", and if I serve them with the correct MIME types, a standards-compliant browser will show them all correctly. A browser that tries to decide what I "really meant" by looking at file extensions is likely to screw up badly.
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Dan's Mail Format Site: http://mailformat.dan.info/
Magus
Posts: 2022
Joined: November 28th, 2002, 11:39 am
Location: that-a-way ->
Contact:

Post by Magus »

So make it as an option. If I want to hit a page like that and get entirely wrong results, that should be my choice, likewise I should be able to tell it to, say, read .rar as .rar regardless of the mime/type.
For every action there is an equal and opposite criticism.
Mattwolf
Posts: 5
Joined: November 11th, 2003, 6:40 pm
Contact:

My fix

Post by Mattwolf »

I also ran into this problem and found a temporary work around. My work around isnt pretty and is Windows only...

Install the IEView extention: http://ieview.mozdev.org/ When ever you run into a site where it displays the item as text right click the link and click on the "Open link target in IE" Then IE will open it correctly.

I wish there was a better way but this is the only way I have found that works 100% of the time.
SuperJeff
Posts: 62
Joined: May 17th, 2003, 4:23 pm

Post by SuperJeff »

I believe the 0.8 branch release has a patch in it that solves most (if not all) of these problems, so be sure to try that if you haven't yet.
Scoo
Posts: 5
Joined: January 9th, 2004, 5:33 am
Location: Germany

Post by Scoo »

i've tryed your option mattwolf, but mozilla tells me "unable to locate internetexplorer".
how can i solve this problem ?
(yes, i have IE installed on my system which is WinXP)
SuperJeff
Posts: 62
Joined: May 17th, 2003, 4:23 pm

Post by SuperJeff »

The fix was checked into the trunk this last week. So if I am not mistaken any future builds of Firebird should not experience this MIME-type problem (or atleast in the most common cases).
I also want to give a big thanks to all the developers who made this happen, particularly Boris Zbarsky who is the one who took charge of the bug.

Also thanks to Daniel Jackson who filed such a well put together bug report of all the ideas and suggestions discussed on the forum.
Scoo
Posts: 5
Joined: January 9th, 2004, 5:33 am
Location: Germany

Post by Scoo »

When and where exactly can i find a newer version of firebird 0.7 ?

tx
intatia
Posts: 296
Joined: January 4th, 2004, 6:02 am
Location: Welly
Contact:

Post by intatia »

This post should answer most questions about finding the latest builds :) http://forums.mozillazine.org/viewtopic.php?t=6381

"Daniel Jackson"... Couldn't help but think StarGate for some reason. :D
denomolos
Posts: 6
Joined: March 8th, 2004, 9:22 pm

Post by denomolos »

Anyone feel like explaining to me what I need to do on my web server so that WMV files on my website are handled properly by Firefox? Right now if I click on a WMV it loads it as a text file, many times locking up the browser in the process.

I tried adding the following line to /etc/mime.types:

video/x-ms-wmv wmv

This doesn't help and restarting Apache didn't help either. I'm running Redhat Fedora. Any help would be appreciated.
User avatar
Spewey
Folder@Home
Posts: 5799
Joined: January 25th, 2003, 2:06 pm
Location: St. Paul, Minnes°ta

Post by Spewey »

I think it goes in Apache's .htaccess
Pizbit
Posts: 29
Joined: October 9th, 2004, 8:49 pm

Post by Pizbit »

Into the apache configuration file that has all the other mimtypes set.
dtobias
Posts: 2098
Joined: November 9th, 2002, 3:35 pm
Location: Boca Raton, FL
Contact:

Post by dtobias »

I thought "mime.types" <i>was</i> that file... but the other poster is also right; you can add MIME types through .htaccess files as well.
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Dan's Mail Format Site: http://mailformat.dan.info/
Pizbit
Posts: 29
Joined: October 9th, 2004, 8:49 pm

Post by Pizbit »

On debian they're specified in the /etc/apache/httpd.conf file too, other distributions might have them in another file in the same directory.
denomolos
Posts: 6
Joined: March 8th, 2004, 9:22 pm

Post by denomolos »

Well I managed to get it to work but it's still very awkward the way Firefox handles these files. When you click on the WMV file, it opens a blank window and just sits there while it's downloading the file. Then finally it brings up the media player and plays it. Then you close the media player and you're looking at a blank web page. It's terrible the way Firefox handles this. It really makes me wish that anyone coming to my website is using IE. Really too bad because Firefox has so much potenitial but it's hard for me to recommend it to normal people when it can't gracefully handle such a common thing.
TheOneKEA
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post by TheOneKEA »

The blank window can be evicted by removing any target=_blank or target=_new diectives you have on the hyperlink pointing to the file, and/or using the Disable Targets for Downloads extension.

If you are using a target attribute on the anchor, why?
Proud user of teh Fox of Fire
Registered Linux User #289618
Post Reply