Handling of incorrect MIME types

Discussion of features in Mozilla Firefox
Post Reply
bad_checksum
Posts: 1
Joined: October 13th, 2003, 8:52 pm

Post by bad_checksum »

I have read thru most of the posts regarding the inability to download some extensions (which come up as text) and have been bothered [but have respect to the developers decisions] at the fact that this is a feature that will not be comprimised to satisfy the few (?) people that are affected by it.

I really like Firebird (have been an IE user since Windows 95 was released) and have been quite impressed at the extensions, and general speed of the browser, but have been put off by the fact that I cannot start simple downloads with a single click (Redirects to zip/rars, bittorrent links, etc.) While this may be the most standards way of doing things, its a quirk that I have tried to deal with, but been put off after about 3 months use.

I also had recommended this browser to almost 20 people, many who installed it, liked it, tried to download a file, got turned off, uninstalled it, and called me stupid for putting up with such a quirk just to save a couple of seconds render time on a webpage. (Although my own reasoning is to avoid BHOs and so-called malicious sites)

As I type this post in Internet Explorer, and wade thru countless posts in search of a quick fix, I would like to remind the developers of this program that they are making a great product, but it's sad to see that they are more bent on winning a standards race than winning the consumers approval.

Thanks for listening. Please don't flame my ass. :p
User avatar
danieljackson
Posts: 83
Joined: July 22nd, 2003, 4:03 pm
Location: UK

Post by danieljackson »

I agree, but will offer a small flame :) : it would've been better to reply to a more recent post on this topic, for example:
RAR archives and FB 0.6.1 (general).

You may also like to see: Bugzilla Bug #220807 - Prompt user about invalid text/plain content - solving most incorrect MIME type issues.

-- if that "bug" (RFE) ever gets implemented, it should fix the MIME-type problem for binary files.
SuperJeff
Posts: 62
Joined: May 17th, 2003, 4:23 pm

Post by SuperJeff »

danieljackson wrote:I agree, but will offer a small flame :) : it would've been better to reply to a more recent post on this topic, for example:
RAR archives and FB 0.6.1 (general).

You may also like to see: Bugzilla Bug #220807 - Prompt user about invalid text/plain content - solving most incorrect MIME type issues.


That is a great job on the bug report. It covers all the information discussed before and is presented as a useful suggestion on how to make both sides happy. Everyone who has been bothered by this before make sure to vote for that bug.
TychoQuad
Posts: 1263
Joined: December 11th, 2002, 12:30 am
Location: Australia

Post by TychoQuad »

SuperJeff wrote:
danieljackson wrote:I agree, but will offer a small flame :) : it would've been better to reply to a more recent post on this topic, for example:
RAR archives and FB 0.6.1 (general).

You may also like to see: Bugzilla Bug #220807 - Prompt user about invalid text/plain content - solving most incorrect MIME type issues.


That is a great job on the bug report. It covers all the information discussed before and is presented as a useful suggestion on how to make both sides happy. Everyone who has been bothered by this before make sure to vote for that bug.


Agreed. A brilliant description and resolution. I hope this gets implimented.
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

A work-around

Post by Conditional »

I have a functional and almost seamless work-around to fix this, but I get my 5 minutes to rant/rave first.

I am a new Firebird user and <i>almost</i> convert. (I <i>was</i> a convert, and then I <i>was not</i> a convert when I came across this problem, but now I just might be a convert again now that I've fixed it. We'll see...) I like Firebird very very much, but I have one question for the developers.

<b><i>Who are you writing this for?</i></b>

I've already skimmed through a number of Firebird web-pages. The stated purpose of Firebird (that I can recall) is to produce a less bloated version of Mozilla that is more responsive and easier to use. (The unstated purpose is to code something that surpasses everything else in quality and ease of use.) Grabbing quotes from <a href="http://www.mozilla.org/products/firebird/why/"><i>http://www.mozilla.org/products/firebird/why/</i></a>

<blockquote>Mozilla Firebird empowers you to accomplish things online faster and more efficiently than any other browser, period. Offering the industry's best implementations of features such as Tab-Browsing and popup blocking, as well as a horde of other seamless innovations, Firebird stands out ahead of every other web browser.

<b>It's all about YOU</b>

The Mozilla Firebird team has focused on the big picture - improving real world performance and increasing the value you get out of your time online. What are you doing online? How can we make that easier for you? Page layout speed is only one part of the equation. Mozilla Firebird's tools will change the way you browse, they will make browsing more intuitive, more convenient, and at the same time orders of magnitude faster. In fact, we believe you'll at least double what you get out of the internet. Mozilla Firebird's tools work with you, rather than against you, as invisibly as possible.
</blockquote>

To this end, the developers will have failed their end users and (publically implied) product mission statement if they do not come up with a user friendly way of handling misconfigured web server MIME types. Period. Having already provided technical support for a number of years, I'd like to think I know a bit about the end user (in)experience. I don't think that they'll give <i>a rat's tail</i> about W3C standards if the software "don't work". They're not interested in the technical reasons or the philosophical of why it should be <i>this way</i> if "it don't work". They'll happily go back to their other browser and pop-up/ad blockers (cough cough - if any) than use something that either "don't work" or requires work to use.

With that said, here is the work-around I came up with. (I haven't seen anyone else do this... so...)


<ol><li>Install the <a href="http://texturizer.net/firebird/extensions/#Things%20They%20Left%20Out">Things They Left Out</a> extension</li>
<li>Quit and restart Firebird.</li>
<li>Go to Tools -> More Options and select MIME-Types.</li>
<li>Add a new MIME type</li>
<ul><li>MIME type: text/plain</li>
<li>Description: *</li>
<li>Extension: rar wmv zip (binary file extensions that you'd "trust" that obviously aren't text/plain)</li>
<li>When a file of this type is encountered: Save it to disk.</li>
<li>Always ask [x]</li>
</ul><li>Click OK. Click OK.</li>
<li>You're done. It may require a restart.</li></ol>

When you encounter a text/plain .txt file, it will open within Firebird.
When you encounter any of the file types you've specified above, it will save them.
When the download manager is done saving the file, click launch.

Nearly that easy... (I have also installed the IE View extension so that I can right-click on something that displays as text inside of Firebird and have IE figure out what to do with it. We'll see how many additional hoops I have to jump through before I start consider another browser...)

My words may have a slight edge to them, but that's only because I really really <i>do</i> like Firebird (and maybe want to see it succeed). Keep up the good work and have fun!

(If this doesn't work for you, then I have yet another work-around that works just about as smoothly.)
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
MisterBigs
Posts: 1
Joined: October 20th, 2003, 9:33 am

Re: A work-around

Post by MisterBigs »

I installed your extension and it worked for a while but it will not work now. I've reinstalled it and have tried to make new entries but it still shows text in the browser. Any suggestions?
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

and failing that...

Post by Conditional »

Don't know why it failed... Hmm...

Failing the first recommendation, install <a href="http://www.proxomitron.info/files/index.shtml">Proxomitron 4.5 June version</a> (Windows only, but I'm certain that there is an easy way of tweaking a proxy server under *NIX to do the same). While this application is no longer being supported, it still works. (Some <i>individual</i> wouldn't stop flaming the author over a feature they didn't like, so the author quit. <i>No, it was not me.</i>)

Once it is installed and configured to start up at system start up, bring up Firebird, go to <i>Tools -> Options: General: Connection Settings.</i> In that window, click on <i>Manual proxy configuration</i>. For <i>HTTP Proxy,</i> type <u>localhost</u>. Port = <u>8080</u>. Click <i>Ok</i>. Click <i>Ok</i>.

Make sure you can still get out to the rest of the world and bring up a web page. Proxomitron is a proxy server that stands between Firebird and the Internet (kinda like a firewall, but not quite). It resides as a server on your computer and <i>should</i> only accept connections from your own computer. It uses a number of very powerful search and replace scripts to filter out the bad things to or from your browser. (We'll be adding a custom filter in just a moment.)

If you're dead in the Internet water after setting the proxy settings, remove the proxy settings and trouble-shoot. If you're okay, then open Proxomitron from the system tray, and click on the <i>Headers</i> button under <i>Edit Filters</i>. Click on <i>New</i>.
<ul><li>For <i>HTTP Header</i>, type <u>Content-Type: Fix Firebird</u>
(because that's exactly what you're doing - it's the one major thing that's broken on it. :P).</li>
<li>For <i>Header value match</i>, type <u>text/plain</u></li>
<li>For <i>Replacement text</i>, type <u>text/fudge</u></li></ul>
Click on <i>Ok</i> as many times as you need to...

This should replace all incoming occurances of "text/plain" with "text/fudge" - a (should be) complelely unknown MIME type. (I fudged it, that's why...) Mozilla / Firebird won't know what to do with it, and it will ask you what it should do.

Save to disk and launch.

...and now for a mini-rant and rave:

Wow... I had no idea I was not able to see alternate style sheets on web pages under IE. (Isn't that part of the CSS 1.0 that they said that they supported?) I was so impressed, I fixed someone else's javascript favelet to allow IE users to be able to toggle through each of them in turn - just so that they could see what they were missing. (I can't quite get it to work as a right-click context menu item, though. :( ) I also learned about CSS (2.0 only)-based menuing systems, and that Mozilla was the first to be able to implement CSS 2.0? (Great work!)

In the process, I also learned about some of those mozilla-specific CSS style sheet settings, like <i>-moz-opacity: (#%)</i>. Um, is that a standard? (cough cough.) I seem to remember seeing a CSS 3.0 proposal for the same thing (<i>rgba(r,g,b,o)</i> to be exact) that was <i>not</i> browser-specific (as -moz-opacity implies itself to be...). So... are the developers going to remove the -moz stuff and go for CSS 3.0 as a <i>standard</i>, or can the misconfigured-on-the-web-server MIME/type of text/plain issue be resolved within Firebird and provide the ease-of-use functionality that was promised?

Sorry for harping on that two days in a row, but when I saw what appears to be Mozilla-specific CSS style statements being used and recognized in Firebird, I couldn't resist... especially since I read somewhere that the MIME/type issue was <i>not</i> going to be addressed because it would "break standards"... I'm hoping that the <i>real</i> reason is that Firebird is still pre 1.0 and that the developers intend to find a way of handling it.

Anyways - the above proxy suggestion should work, but it will rewrite <i>all</i> text/plain MIME types, including those of <i>.txt</i> files. Oh well... give it a try. If anything, Proxomitron adds some very powerful filtering capabilities to Firebird and has an extensive set of filters/recipes of its own (although I bet you can turn off a few of those filters because they're already handled in Firebird). Good luck.

(If that fails, you will probably want to check out some Proxomitron discussion forums to make sure that the rule is set up properly.)
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Re: and failing that...

Post by Pike »

Conditional wrote:In the process, I also learned about some of those mozilla-specific CSS style sheet settings, like <i>-moz-opacity: (#%)</i>. Um, is that a standard? (cough cough.) I seem to remember seeing a CSS 3.0 proposal for the same thing (<i>rgba(r,g,b,o)</i> to be exact) that was <i>not</i> browser-specific (as -moz-opacity implies itself to be...). So... are the developers going to remove the -moz stuff and go for CSS 3.0 as a <i>standard</i>, or can the misconfigured-on-the-web-server MIME/type of text/plain issue be resolved within Firebird and provide the ease-of-use functionality that was promised?


These vendor-specific extensions are described here:

http://www.w3.org/TR/2003/WD-css3-synta ... r-specific

They are used in Mozilla to implement the user interface which is written in XUL, XBL, Javascript and CSS. Obviously the user interface requires features that are not available in the normal standard, so these features are implemented using a vendor-specific extension starting with -moz.

They are also used to allow implementation of new (CSS3) features, creating a -moz version of the new property allows it to be tested live in the browser without worrying if it doesn't work exactly as it should. When the new feature is complete and 100% compliant with the standard it will be renamed to it's final name by removing the -moz part.
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

Not to stray too far (and more possible recommendations)

Post by Conditional »

I don't want to get too far off-topic, here. I can appreciate the use of -moz styles as a way to test the implementation of upcoming standards from a coding perspective. To nitpick on standards - the link you have included describes a standard for including non-standards. It's still non-standard (in the same black and white absolute view that I understand is currently being used to address mis-MIME-d types.)

My original point is that the developers won't make it so that Firebird is able to recognize and handle mis-MIME-dd types because there isn't a standard for doing so. (Maybe it should become one... A Request For Comments-RFC, anyone?) Doing so makes it so that the end-user has to jump through more hoops just to use Firebird than they would have with the first browser that was probably installed on their system. (And the end goal of Firebird is to make it easier to use?) Yet, they use -moz CSS styles, which are non-standard. (Because it is easier to develop future features that way?) So it looks as though they'll bend standards for their own ease of development purposes (and then distribute them), but not to make Firebird easier to use for the end user?

I don't want to stray too far down this road of thought because I think it will produce more disagreements than solutions that can go way off topic and not really address the problem. The problem is that Firebird won't deal with mis-MIME-d type intelligently, and that's a problem I'd like to see resolved.

If it is never going to be addressed, then what do we have to do? Put together a development team to do a project based off of Firebird (Firebirdie?) that knows how to deal with mis-MIME-d types intelligently and see how many downloads it gets over Firebird? (I say that because I feel that this should be working when installed and not through an optional extension that requires additional installation steps in order to get it to work.)

(I suppose another work-around that doesn't really fix the problem is to campaign web server developers to preconfigure MIME types as part of their distributions or updates, if they don't already...? It has been a while since I've installed Apache. I wonder what they do by default...)

I'd like to stick to the "Handling of incorrect MIME types" discussion as much as possible. I'll gladly take a philosophical discussion over the implementation of standards in another thread. There are many things I admit that I don't know, and it might prove to be interesting reading.
Last edited by Conditional on October 21st, 2003, 10:18 pm, edited 2 times in total.
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

I think you're being unfair here, including a proprietary feature should always be frowned upon, and can cause problems if its use becomes popular. However doing so does not break any standards whatsoever, the CSS2 properties are in no way mutually exclusive with non-CSS2 properties, if they were we'd have no CSS1 support and the day CSS3 became a standard we'd have to strip out CSS2 support, nor could support for any other stylesheet languages be added. On the other hand ignoring an existing, clearly stated rule such as no content-sniffing if a file has a MIME type does break a standard.

Anyway like you said I'll leave it at that to avoid taking this thread further off course, this detour is pretty much irrelevant, it's just that I object to your comparison between these two issues not necessarily your overall message. :-)
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

Understood.

Post by Conditional »

I think the MIME/type standard may be broken if using it diminishes Firebird's ability to do its job. (A new RFC? Anyone?) I'm not attacking the CSS implementation, and the comparison may be a bit unfair as well. (I actually like the -moz stuff, and I use them in addition to the IE filter effect...) I just want to see Firebird deliver, and I see the MIME types as a hurdle that will impact the end-user who just won't understand.
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
dtobias
Posts: 2098
Joined: November 9th, 2002, 3:35 pm
Location: Boca Raton, FL
Contact:

Standards

Post by dtobias »

Some of you are making "apples and oranges" comparisons with regard to standards noncompliance. Not all "nonstandard" things are against the standards in the exact same way, and there are significant differences in the actual and potential problems caused by different kinds of "standards breaking".

On the one hand, adding implementation of things that aren't in the standard, such as the BLINK and MARQUEE tag, the "about:" URI protocol, or various proprietary CSS properties, can be done without in any way impairing the ability of a browser to properly render content that *does* conform to the standards. A standards-compliant document wouldn't include any of these nonstandard tags, properties, and protocols, so what Mozilla does upon encountering them is irrelevant in such a case. Any rendering (or misrendering) of them is purely error correction on Mozilla's part (though sometimes the standards might dictate what sort of reaction the browser ought to have, such as the requirement that unrecognized CSS properties be ignored). There are still standards-related consequences of such implementations, including the possibility that site authors will be thus encouraged to use such nonstandard content because "it works in my favorite browser", to the detriment of Web standards and interoperability, but it needn't happen.

On the other hand, an implementation that *breaks* the standards-based rendering of a document that complies fully with the standards is a much more serious sort of standards noncompliance. As it now stands, it's entirely possible to serve a plain text document, with the correct MIME type, and have it fail to render correctly in MSIE and/or Opera due to those browsers' MIME-second-guessing. I run into this problem all the time when writing maintenance and diagnostic Perl scripts, giving simple status output in plain text when run, but which can't reliably be used as CGI scripts except via the Mozilla browser because the .pl extension causes bizarre misinterpretation on the part of second-guessing browsers.
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/
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

Yup. A&Os.

Post by Conditional »

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.

I'd love to research this one further: from server through standards to (cross-platform) client, but I already have (more than one) work-around that works, and I am in much need of a job. (I must spend my time on that, instead.) I can get the results I want because I know how to tweak things.

The typical end-user, however, won't.

Now if I can figure out why the Quicktime plugin doesn't work... (msg me if you know that one)... I'll search through forums later after I post some more job apps.
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
David H
Posts: 2254
Joined: June 13th, 2003, 5:17 am
Location: Japan

Re: and failing that...

Post by David H »

Conditional wrote: If you're okay, then open Proxomitron from the system tray, and click on the <i>Headers</i> button under <i>Edit Filters</i>. Click on <i>New</i>.
<ul><li>For <i>HTTP Header</i>, type <u>Content-Type: Fix Firebird</u>
(because that's exactly what you're doing - it's the one major thing that's broken on it. :P).</li>


You do realize that the Proxomitron already comes with a mime-type filter set up for you, don't you? All you have to do with it is add the proper entries into the blockfile it uses as you come across them. I have about a dozen entries in mine and I haven't had to add any new ones in ages.
Conditional
Posts: 6
Joined: October 19th, 2003, 6:46 pm
Contact:

Proxomitron: No, I didn't.

Post by Conditional »

I only downloaded Proxomitron to see if I could implement a work-around using it.

What you're saying is to do this from within Proxomitron instead (for anyone else):

Config -> Blockfile (tab) -> MIME-list -> Edit

Add additional corrections on seperate lines using the same format in existing lines. Requires knowledge of the correct MIME type per file extension. (Your favorite search engine should be able to find that...)

I don't currently have Proxomitron running. I'm trying to keep things running as lean and mean as possible. (I don't mind extensions.) I've been happy with the filtering in Firebird so far.
- Conditional

...and if you know of any tech support / project planner/advisor/management jobs in Austin, let me know! :D
Post Reply