Closed Bug 272740 Opened 20 years ago Closed 20 years ago

hyperlink targets don't properly recognize/acknowledge Windows filetypes

Categories

(Firefox :: File Handling, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: abenas66, Assigned: bugs)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

please see my detailed page, including screenshots at:
http://andre.isgreat.tv/firebug/

Reproducible: Always
Steps to Reproduce:
1. click on a hyperlink with PLS file as target
2.
3.

Actual Results:  
browser displays contents of PLS file as text

Expected Results:  
should have launched default associated application, PowerDVD

please see my detailed page, including screenshots at:
http://andre.isgreat.tv/firebug/
(by Reporter)
The example is simplified, and is only one variation of the overall problem.

For all the related issues (with screenshots), please see:
http://andre.isgreat.tv/firebug/

You're reporting 3 or 4 different issues on your page.

One issue per bug report, please.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
-> invalid
The URL resolves to a p0rn page.

"Actual Results:  
browser displays contents of PLS file as text"

There is only one reason for that: Your server sends the wrong mime-type for
this file. Mozilla doesn't care about the extension, it looks for the
content-type sent by the server (that's part of the http RFCs).

Example of a wrong configured server :
http://www.mversen.de/mozilla/text/mozilla.rar

and one correct example on the same server :
http://www.mversen.de/mozilla/rar/mozilla.rar

You can test the header sent by the server if you open 
http://web-sniffer.net and enter both URLs there. 
You get "Content-Type:	text/plain" for the first URL and Mozilla correctly
handles this file as text .
The second URL gives you  "Content-Type:	application/x-rar-compressed" and
Mozila correctly offers to save the file.
(from original Reporter):
My apologies if my host defaults to a porn page ONLY when the host is doing
maintenance.
The URL
http://andre.isgreat.tv/firebug/
is nevertheless valid MOST OF THE TIME.  I just checked it.

The issues I discuss all have to do with the exact same functionality:
File Types and their associated applications.
Do I need to post these issues as three separate bugs?
It sounds like my post is being dismissed as an excuse; I put a lot of effort
into my documentation.

In response to matti@mversen.de ...
My "server" is my local PC (this is all "local" pages), so if as you state, my
server is sending the wrong mime-type for this file, then wouldn't this state of
affairs also cause Internet Explorer (on this same "server") to open the PLS
file as text???  IT DOESN'T.  Internet Explorer correctly launches the
associated program, PowerDVD and PowerDVD furthermore correctly processes the
PLS file and plays the movies contained in it.  No doubt, the association is
picked up directly from Windows Explorer Tools | Folder Options | File Types,
where it is correctly defined (and correctly processed also by Windows Explorer,
when a PLS is clicked there).

You're making assumptions that I don't know what I'm talking about.  Firefox
simply doesn't recognize the PLS extension properly.  It should pick it up from
the registry.

If I may be so bold here, my whole issue is that I don't want anyone assuming
that rar-compressed or whatever should be saved while others get displayed, and
yet others can be "run", etc. etc., without any intervention or control.  Isn't
it far more work to keep a table of what you "think" you should do with each
one?  There are hundreds!  Defaults are fine, but can't I have the option of
creating the program association (as in the case of the first encounter with an
AVI), and making it permanent with whatever program I want?  Is there a hack
that would meet my needs?  Can I access the table of file associations to add
new entries directly?

If this is not the right place for this question, will someone please direct me
to where I should post my question and have a chance to get it answered competently?

You guyz brag about your flexibility then close my thoughtful and time-consuming
 report on a technicality just so you don't have to deal with the problems I
present.  Sheesh.

Also, please note, as I stated originally:
The PLS example is a simplified instance of the overall problem.
For the big picture (problem stated "generally", with screenshots), please see:
http://andre.isgreat.tv/firebug/

My problem is that I don't have the control I want over filetypes.  The specific
 details are all examples of this bug/problem.  Please don't try to dismiss the
problem by saying it's really three problems (just because I was thoughtful
enough to itemize), and then throw my report away.


(In reply to comment #4)
> (from original Reporter):
> The issues I discuss all have to do with the exact same functionality:
> File Types and their associated applications.
> Do I need to post these issues as three separate bugs?
> It sounds like my post is being dismissed as an excuse; I put a lot of effort
> into my documentation.

I can see that, but unfortunately no matter how well thought out your
documentation, the bug is still invalid. Mozilla does not look up file
extensions, it simply checks the MIME type, which if sent incorrectly will cause
problems. This is not a Mozilla bug, rather this is the correct behaviour as
defined by spec. If IE does something different, it's because IE's behaviour is
broken with respect to the spec. Blame them, not us. See here for our
implementation of MIME types:

http://www.mozilla.org/docs/web-developer/mimetypes.html

> In response to matti@mversen.de ...
> My "server" is my local PC (this is all "local" pages), so if as you state, my
> server is sending the wrong mime-type for this file, then wouldn't this state of
> affairs also cause Internet Explorer (on this same "server") to open the PLS
> file as text???  IT DOESN'T.  Internet Explorer correctly launches the
> associated program, PowerDVD and PowerDVD furthermore correctly processes the
> PLS file and plays the movies contained in it.  No doubt, the association is
> picked up directly from Windows Explorer Tools | Folder Options | File Types,
> where it is correctly defined (and correctly processed also by Windows Explorer,
> when a PLS is clicked there).

What I said above. IE's behaviour is incorrect and ours is correct. We don't use
IE as a benchmark for what we should be doing. We parse MIME types, not file
extensions. A web browser should not be looking up extensions in the registry at
all. Comparing to PowerDVD is completely meaningless. That is not a web browser
and follows a totally different set of rules.

> You're making assumptions that I don't know what I'm talking about.  Firefox
> simply doesn't recognize the PLS extension properly.  It should pick it up from
> the registry.

It would appear that these assumptions have been borne out. It should not pick
it up from the registry. By the way, flaming frequent Mozilla contributors over
email to me does not endear yourself.

> one?  There are hundreds!  Defaults are fine, but can't I have the option of
> creating the program association (as in the case of the first encounter with an
> AVI), and making it permanent with whatever program I want?  Is there a hack
> that would meet my needs?  Can I access the table of file associations to add
> new entries directly?

It was decided not to add this UI into Firefox. If you really want it, feel free
to write an extension that adds this capability so others can benefit as well
from your implementation.

> You guyz brag about your flexibility then close my thoughtful and time-consuming
>  report on a technicality just so you don't have to deal with the problems I
> present.  Sheesh.

Thoughful and time consuming though it may be, I have to tell you that it's just
simply wrong. We're closing it on a technicality because the technicality is
spec related and demands that we do that.
Status: RESOLVED → VERIFIED
You may have more knowledge than I do about mime-types and you may even be
technically correct when you say Mozilla handles the PLS file correctly
"according to spec", however Internet Explorer is not broken. Both Internet
Explorer and Windows Explorer do what PowerDVD users expect and need for a PLS
file to do and that is to play the movies in it.  Looking at the text in it is
useless to us and since that is all I seem to be able to do with Firefox, for
this application Firefox is completely useless to me.

Therefore, until I find the time to download all the sourcecode or whatever and
I doubt if I will, I will leave you to your specs, forget about Mozilla as a way
to make my application work since it never will, and go back to hobbling along
the way I have been, using Internet Explorer, which handles the PLS filetype
correctly, sorry to say.

It's too bad Firefox doesn't handle other filetypes the same way it does AVI
files, asking what program to launch and if you want to make that association
permanent.  That, in my opinion is the correct thing to do because it allows the
end-user to do what needs to be done whatever it may be.  Yet you say it was
decided not to implement that UI.  The functionality is already there, only
Firefox does not want to handle each filetype in the same manner!!

In the case of an AVI file, why does Mozilla not handle the file according to
the MIME type, rather than allowing user intervention?  That does not seem to be
consistent with your writings.
(In reply to comment #6)
> In the case of an AVI file, why does Mozilla not handle the file according to
> the MIME type, rather than allowing user intervention?  That does not seem to be
> consistent with your writings.
> 

In the URL I mentioned, take a look at the Unknown Decoder section.
"The functionality is already there, only
Firefox does not want to handle each filetype in the same manner!!"

That is wrong. It's a sign that the server is correctly configured for .AVI 
files and but not for .pls files or that Mozilla found binary only chars in that
file which is send as text/plain. The Mozilla internal unkown content decoder
show a save as dialog in that case and only for this special case.
IE is broken in that case and don't blame us for the broken IE (which caused
already many security holes in IE) and don't blame us for the server Admin who
don't know how to configure one of the easiest thing of a little http Server.

You wrote 
"My "server" is my local PC (this is all "local" pages)"

That means you start to blame us because you are to dumb to configure your http
server  ?
Or are that files from your local Filessystem via file:// ? 
(But you didn't wrote that in your bug report and that means that I have to
assume that it's a http server)

Don't cry here if you don't want or can't read the specifications or if you
can't follow the reason why a client must use the conten-type header and not
windows filetypes.

If you can't accept that be happy with IE - Bye
Or are THOSE/THESE files from your local FILE SYSTEM via file:// ?
(But you didn't WRITE that in your bug report and that means that I have to
assume that it's a http server)

Yes, that's right.  Amazingly, you did not understand or get beyond the FIFTH
SENTENCE (that's sentence number five) of my bug report, which states:
  A little background so you can see my angle on this particular problem:
  I'm developing a movie playing system that's based on "local" html pages.
The URL, again:
http://andre.isgreat.tv/firebug/

However, I am not pursuing this issue any more until I can understand file
headers and mime-types enough to discuss it, so you can stop belittling me and
my limited knowledge of these topics.  I haven't BLAMED anyone for anything, I
simply asked to have the procedure revised so I could have more control.

If someone had the time, I would appreciate getting pointed in the right
direction to do whatever is needed (within or outside of Firefox), to force
launching of PowerDVD when a PLS file is clicked in a hyperlink.  Apparently, I
don't know what to do to make this happen.

Andre I have an idea, try this:

Since you're loading this off file://, there is no webserver. When creating
links for your playlist files, try something like this: <a href="whatever.pls"
type="correct/mimetype">foo</a>

Where correct/mimetype is the correct mimetype for the type of playlist you're
serving. I don't know what this is offhand, but I bet you could look it up.

Let us know if this works for you. I still don't think its a Firefox/Mozilla
bug, but this may be a suitable workaround for you.
"loading local" doesn't mean that you load it via file:// URL. 
In many cases it means that you are running a local web-server on your system..

This would be a bug in the unkown content decoder because there is no
mime-header for local file systems and the unkown content decoder should not
only check for binary chars in that case, it should also look for the registered
fileextensions.

Thanks for the help.  With this news I'm convinced it could be made to work. (I
tried adding a new filetype in Windows, which gives you a pulldown of 100s of
types but was unable to determine which would apply, however).

However, upon pondering the big picture of whether Mozilla could be the right
browser for my (very specific) application I realize there are other hurdles. 
My pages use inline videos and background sounds (bgsound), and I noticed right
off that the bgsound is (at least by default) not recognized in Firefox.
bgsound is IE only but you can use <embed> and <object>
You need to log in before you can comment on or make changes to this bug.