Closed Bug 297231 Opened 20 years ago Closed 20 years ago

Firefox is too picky in file handling

Categories

(Firefox :: File Handling, enhancement)

x86
All
enhancement
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: psycho_named_bob, Unassigned)

References

()

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: All versions of Mozilla Firefox ever to have been released.

There is a certain method that you may or may not want to support in maximizing 
one's benifit of a free webhosting service by removing it's ads from your 
webpage.  The trick: rename all webpages to the file extension of .jpg instead 
of .htm (of course with the exception of your index.htm that needs to load 
automatically).  This trick works wonders in every browser except for Mozilla 
Firefox.

Given the moral questionability of the practice, I'm not urging you to fix the 
issue, but just letting you know about it.  Fixing this issue would surely 
encourage several of my friends to use the browser as much as I do.

Here's the problem.  When any other browser encounters the file, they ignore 
the extension and find a text header inside the file (I think header is the 
right word, I'm no computer engineer), and translate it accordingly. The page 
loads seemlessly.  In firefox, it reads the extension and expects an image to 
result, and when it gets text, it just ignores the output and posts an error 
message saying that the image contains errors.

This is annoying when I try to view one of my friends home pages just to be 
reminded once I get to it that I have to switch to Internet Explorer.

Steps to reproduce:
Visit http://schnitzendoble.tripod.com/ in any other major browser.  Watch it 
load the home page, then click "Offshore Work," and watch it load.  Now do the 
same in Mozilla firefox.  The frames just don't load.

Reproducible: Always

Steps to Reproduce:
1.Visit http://schnitzendoble.tripod.com/ in any other major browser.
2.Watch it load the home page, then click "Offshore Work," and watch that load.
3.Now do the same in Mozilla firefox, and see it not load.

Actual Results:  
The frame called to load offshore.jpg loads the error message "The 
image 'http://schnitzendoble.tripod.com/files/offshore.jpg' cannot be 
displayed, because it contains errors."

Expected Results:  
The frame called to load offshore.jpg should load it as a webpage.  In other 
words, Mozilla Firefox should have the flexibility to read a .jpg or .gif file 
(or any other file type) as a .htm text file.  And perhaps vica-versa.

This has always been a problem with Firefox, even from version .1.  I've been 
waiting, hoping to see it fixed, and just recently thought to report the 
problem.  The problem exists on Windows 98 SE, 2000, and XP; on several 
computers of very distinct hardware configurations; and on several different 
webservers hosting several different webpages made by a number of different 
people.
The bug you describe is a bug in IE. When you rename the file to .jpg, the
server starts sending the content-type as image/jpeg, which Firefox obeys. Since
the page is not a valid image, Firefox displays an error, as it should. Internet
Explorer does content-sniffing, which is in violation of the RFC and leads to
various other issues.

You would be perfectly able to view the page if you configured the server to
send the .jpg files as text/html, but since it's a free web host you're likely
unable to do that.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
verified

Firefox does it correct while IE is broken.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.