Closed Bug 233465 Opened 21 years ago Closed 21 years ago

Unrecognized File Type Treated As Text

Categories

(Core Graveyard :: File Handling, defect)

x86
Windows 98
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 220807

People

(Reporter: qwoir, Unassigned)

Details

User-Agent:       
Build Identifier: (Mozilla 1.6, which is not the browser being used to type this report)

You could say that this isn't really a bug, but it results in the display of
lots of garbage characters in the event that Mozilla doesn't recognize a file
type.  For instance, if the extension is .ROM (like for a binary ROM), Mozilla
just displays the file as text, when the polite action would be to open a
download dialog (assuming, of course, that there isn't some plugin which
services .ROMs).  (.BIN, by contrast, causes a download dialog to open.  And of
course .HTM and .HTML are handled natively.)  If there is _no_ file extension,
then I would suggest behaving as though the extension is unrecognized, although
this is open to debate.


Reproducible: Always
Steps to Reproduce:
1. Call a file "XYZ.XYZ".  Save it to C:\.
2. Open C:\XYZ.XYZ in a new browser.
3. Observe that Mozilla treats it as text.


Actual Results:  
Proprietary file types are rendered as ASCII.

Expected Results:  
Open a window saying "I don't recognize this.  Should I download, download and
execute, cancel, or whatever?"

The current behavior is very annoying when the user is trying to download a
proprietary file type, because now he has to click "Back", then right-click on
the link and select "Save Target As...", instead of immediately getting the
download dialog.
> The current behavior is very annoying when the user is trying to download a
> proprietary file type

When we download, the _server_ is what provides the type.

For local files, we will in fact look at the data and if it looks like it's not
text we will treat it as binary data.  Did you actually do this file:/// test of
yours with a binary file?
Assignee: nobody → file-handling
Component: Layout: Fonts and Text → File Handling
QA Contact: core.layout.fonts-and-text → ian

*** This bug has been marked as a duplicate of 220807 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.