Open Bug 1679071 Opened 5 years ago Updated 2 years ago

"Open with" should not add .txt for files served with text/plain mimetype if there is header/<a download> information about the filename including an extension

Categories

(Firefox :: File Handling, defect, P5)

Desktop
Windows
defect

Tracking

()

People

(Reporter: tustamido, Unassigned)

References

Details

Attachments

(1 obsolete file)

Tested with a fresh new profile using Firefox 84 on Windows 10.

Firefox should respect suggested file extension even if MIME type is text/plain.

Example:

  • Install Imagus addon.
  • Go to its Options, click Sieve then click export button (↑).
  • Download popup will show up. It's a JSON file, but without proper MIME type.
  • If you click to save, it's all right, file will be saved as .json (Imagus-sieve.json).
  • But if you use "Open with", Firefox will save it in %TEMP% folder as .txt (more precisely: Imagus-sieve.json-1.txt).

I have also experienced this in Skype Web while trying to open PDF file misstyped as text/plain. Firefox adds .txt and of course the file doesn't open correctly.

My workaround was to manually edit handlers.json adding
"text/plain":{"action":4,"ask":true,"extensions":["json","pdf",...],...
but Firefox should handle this by default.

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gijskruitbosch+bugs)

Is this a regression? When did it break?

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(tustamido)
Summary: "Open with" adds .txt for files misstyped as text/plain → "Open with" adds .txt for executable files served with text/plain mimetype
Summary: "Open with" adds .txt for executable files served with text/plain mimetype → "Open with" adds .txt for files served with text/plain mimetype

(In reply to :Gijs (he/him) from comment #2)

Is this a regression? When did it break?

I don't think so, it's reproducible even with Fx 56.

Flags: needinfo?(tustamido)

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gijskruitbosch+bugs)
Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(gijskruitbosch+bugs)
OS: Unspecified → Windows
Priority: -- → P5
Hardware: Unspecified → Desktop
Summary: "Open with" adds .txt for files served with text/plain mimetype → "Open with" should not add .txt for files served with text/plain mimetype if there is header/<a download> information about the filename including an extension
See Also: → 1691024
See Also: → 1650528
See Also: 16505281617457
Attachment #9382867 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: