Open Bug 229871 Opened 21 years ago Updated 2 years ago

opening gzipped word document can have interesting behaviour

Categories

(Firefox :: File Handling, defect)

x86
Windows 2000
defect

Tracking

()

REOPENED

People

(Reporter: Biesinger, Unassigned)

References

()

Details

STEPS TO REPRODUCE (tested with build 2003123109 win2k):
(the actual steps require word installed. feel free to
s#application/msword#text/plain# and use notepad)
1. use the php script from bug 229870 comment 0
2. add a helper application for any mimetype, extension gz, use "open with
default application", check "always ask me"
3. make sure you don't have an application/msword helper app set up

Now: Load the php script from step 1. Note that the dialog says "Open with
default application (Word)". make sure that is selected, click OK.

ACTUAL RESULTS:
watch Winzip open with the file.

EXPECTED RESULTS:
Word should open the file.

ANALYSIS:
1. we lookup the mimeinfo from the os, and get one for application/msword as
expected
2. we look in prefs and find no mimeinfo by type
3. we look in prefs and do find a mimeinfo by extension (gz)
4. the final mimeinfo we have has this properties:
Type        application/msword
Extensions  gz doc 
Default application description: Word 

NOTES SO FAR:
o) primary extension is gz! this is because we got gz as an extension from 
   prefs, and we set it as primary one in DoContent because it matched the url's
   extension)
o) On windows, mozilla does not explicitly store the default application here, 
   only its description!

END RESULT:
nsExternalAppHandler decides that the file (word.php.gz) already matches the
primary extension of the mimeinfo (gz, see note 1), and does not append any
further extension.

In the end, it ShellExecutes the file with the original filename (word.php.gz),
opening the default application for .gz files.
Yeah, we need a better way to do this for content-encoded cases.  This probably
depends on the "decode always for opening in apps" bug.

*** This bug has been marked as a duplicate of 229870 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
oops, that was the wrong box
Status: RESOLVED → REOPENED
Depends on: 229870
Resolution: DUPLICATE → ---
No longer depends on: 229870
Blocks: 324781
Assignee: file-handling → nobody
QA Contact: ian → file-handling
Product: Core → Firefox
Version: Trunk → unspecified
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.