Autodetect correct MIME type from text/plain content
One of the problems that many Mozilla users experince it that content on the internet are served with the wrong content type. The results in fx WMV files not launched in Windows Media Player but instead shown as text in the browser window. This is due to the server sending the wrong content type to the browser so it thinks and treats, correctly, the content as plain text.
It's not a Mozilla problem but a server side problem.
But in Mozilla Firebird version 0.8 this will change. Mozilla Firebird will get a lot smarter about situations like this. Mozilla Firebird is gonna get autodection of binary content.
You can see all of the coding details in bug 220807. But basiclly what is being done is that Mozilla downloads a small part of the file and then tries to determine if the content is binary. If it is then Mozilla tries to find an helper application based on the extension of the file, to launch.
Read more about the 0.8 branch
Ads:
5 Comments
I hope this is done in a sane way. Like allowing you to right click on a link and have it give you an option to view/save it in a different way, and not just catering to stupidity. That would start to lead us down the road to a adding a IE mode to page rendering...
Comment by Sharki at December 19, 2003 06:50 AM | PermalinkSharki: The implementation is very sane. bz wouldn't do it any other way. It only applies if the Content-Type is either "text/plain" or "text/plain; charset=iso-8859-1", which are the default setting on most versions of Apache, and the text does not start with a Unicode byte order mark signifying UTF-16/32, and the body contains embedded ASCII control characters, such as NUL. It's not going to start ignoring valid Content Types, and if your text/plain document has control characters in it, and isn't Unicode, then you're breaking the HTTP standard anyway.
Comment by Ted Mielczarek at December 19, 2003 02:53 PM | PermalinkBut now webmasters won't have any reason to fix their servers. Atleast before there were some people who would complain. Now they can say that it works, so they shouldn't have to fix it.
Comment by Sharki at December 20, 2003 05:46 AM | PermalinkCan anyone confirm this fix will also end-up in the normal mozilla build or only in Firebird ?
Thanks,
Stef
Comment by Stef at December 22, 2003 02:24 PM | Permalink
WinXP SP2 will change its default MIME type behaviour to a stricter one:
Comment by Olivier Cahagne at December 18, 2003 11:27 PM | Permalinkhttp://www.microsoft.com/downloads/details.aspx?FamilyID=7bd948d7-b791-40b6-8364-685b84158c78&DisplayLang=en