Closed Bug 223055 Opened 21 years ago Closed 21 years ago

[FIXr]try to open a local html-file, asks for saving

Categories

(SeaMonkey :: General, defect, P1)

x86
OS/2
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.6beta

People

(Reporter: Studler, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.5) Gecko/20031017
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.5) Gecko/20031017

With the new Mozilla 1.5 i want to display an html-file on a CD. 
Instead of reading and displaying it, a windows pops asking where to save this
file. 

Kind regards, Erwin

Reproducible: Always

Steps to Reproduce:
1.Mozilla 1.5 start
2.file
3.open file
What OS are you using?  What is the file called?  And what is the EXACT dialog
you get?
The OS is WARP 4.52; 
I want to read a file called INDEX.HTM from a CD. 
1. File
2. Open File....
3. Select INDEX.HTM 
4. Dialog window appears: Enter name of file to save to....

In the meantime, I checked using Mozilla 1.5 and different -.HTM files. 
Sometimes the content is displayed normally, others not (point 4). 
Also, no difference from where the file is red: HD (local or remote) CD....

Same file in question is correctly displayed using other browsers like  IBM Web
browser or the new MozillaFirebird (Mozilla/5.0 (OS/2; U; Warp 4.5; en-US;
rv:1.5) Gecko/20031015 Firebird/0.7).

Regards, Erwin
What do the contents of the file involved look like?  Can you attach it to this
bug using http://bugzilla.mozilla.org/attachment.cgi?bugid=223055&action=enter ?
bz: hm, why is that relevant?

erwin: Could you close mozilla, enter these commands in a console window:
set NSPR_LOG_MODULES=HelperAppService:5
set NSPR_LOG_FILE=bug223055.log
mozilla

and reproduce this bug, and attach bug223055.log to this bug afterwards?
Summary: try to open a html-file from somewhere (CD), no display but asks for saving → try to open a local html-file, asks for saving
Hmm... yeah, we have an internal mapping for "HTM", so we should never be
sniffing.....
Attached image Normal CD Index-file
Tried to reproduced this problem using the win version of Mozilla 1.5. Result:
unable to reproduce. 
> 0[32965a0]: HelperAppService::DoContent: mime 'image/tiff', extension 'HTM'

0[32965a0]: Data source: Via ext 0x4097e80
0[32965a0]: Extension 'HTM' matches mime info: 'yes'
0[32965a0]: HelperAppService::DoContent: mime 'image/tiff', extension 'HTM'

It looks like you have that extension mapped to the image/tiff MIME type in your
helper app preferences...  Is that the same reason that your uploaded attachment
is image/tiff instead of text/html?
Taking.  biesi found an issue that will actually fix this (though you may want
to fix your preferences anyway).
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: other → OS/2
Priority: -- → P1
Target Milestone: --- → mozilla1.6beta
Summary: try to open a local html-file, asks for saving → [FIX]try to open a local html-file, asks for saving
Attached patch PatchSplinter Review
Attachment #133837 - Flags: superreview?(darin)
Attachment #133837 - Flags: review?(cbiesinger)
Attachment #133837 - Flags: review?(cbiesinger) → review+
biesi/boris - Can you give some background on this just for fun?
sure; for local files, we get the mimetype from the used extension. now, for
some common extensions we hardcode the mime type - the list is at
http://lxr.mozilla.org/seamonkey/source/uriloader/exthandler/nsExternalHelperAppService.cpp#297

Unfortunately, ever since we started doing that, we used a case-sensitive string
compare for the extension. so a .HTM extension would not match our hardcoded
entry for .htm. this is the first part of the problem.
The second problem is that the reporter of this bug has a setting in his helper
applications preference that maps .HTM files to image/tiff, apparently. Since we
did not find an entry in our hardcoded list, we use that. and we don't know how
to display tiff images. hence this bug.

this patch now changes it so that we do a case-insensitive check on the
extension, so that our entry for .htm matches the .HTM extension, and gives back
a mimetype of text/html.
I never touched that area, as far I know. But there 
is an entry: (edited)
MIME Type: image/tiff  
Description: HyperText Markup Language
Extension: htm html shtml ehtml
When a file of this type is encountered: * save to disk
Thank you very much and kind regards, Erwin
After deleting this entry and Mozilla restart 
the file is now displayed correctly, even 
with capital letters. 
Thank you 
and regards, Erwin
 
check downloads.rdf, it's possible you'll find a mail entry with &type=image/tiff 
String not found in file
Attachment #133837 - Flags: superreview?(darin) → superreview+
Summary: [FIX]try to open a local html-file, asks for saving → [FIXr]try to open a local html-file, asks for saving
Patch checked in for 1.6b.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 224216 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: