"Do this automatically for files like this" doesn't

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

dietmar

"Do this automatically for files like this" doesn't

Unread post by dietmar » 2017-12-07, 09:26

27.6.2 on Ubuntu 16.04 (64bit)

When downloading files (e.g. PDF) a dialog pops up to ask whether to save or open the file (and with what).
The dialog offers a setting
"Do this automatically for files like this from now on"
Though it doesn't! Even if checked, the dialog will re-appear at the next download and will NOT open automatically with the selected program.

Dietmar

joe04
Lunatic
Lunatic
Posts: 259
Joined: 2015-09-28, 16:38
Location: US
Contact:

Re: "Do this automatically for files like this" doesn't

Unread post by joe04 » 2017-12-07, 17:11

Not just a Linux problem, it's like that on Windows too.

fillerup
Lunatic
Lunatic
Posts: 495
Joined: 2014-05-19, 19:14
Location: Finland

Re: "Do this automatically for files like this" doesn't

Unread post by fillerup » 2017-12-07, 17:47

one of the browser's longstanding issues, even if it's relatively minor. though this does not happen to .torrent files

amberit
Newbie
Newbie
Posts: 4
Joined: 2017-09-30, 19:13
Contact:

Re: "Do this automatically for files like this" doesn't

Unread post by amberit » 2017-12-07, 19:30

Windows 7 SP1 x64, latest Pale Moon x64 on Asus P81IJ ( Intel Dual Core CPU, 2.10 GHz, 4G RAM ), latest Basilisk on Debian Jessie. I appreciate these browsers for their speed and ability to customize.

dietmar

Re: "Do this automatically for files like this" doesn't

Unread post by dietmar » 2017-12-08, 08:43

fillerup wrote:one of the browser's longstanding issues
OK, some newbie questions:
  • Where in this forum (or elsewhere) can I find out if such is a known bug?
  • What's the correct procedure to report bugs in PM?
Dietmar

GMforker
Astronaut
Astronaut
Posts: 537
Joined: 2015-08-27, 06:29
Location: Czech Republic

Re: "Do this automatically for files like this" doesn't

Unread post by GMforker » 2017-12-08, 11:14

joe04 wrote:Not just a Linux problem, it's like that on Windows too.
Please give an example. Depends on MIME type:

Examples:

http://www.pdf995.com/samples/pdf.pdf
- MIME type: "application/pdf" (true)

https://github.com/mozilla/pdf.js/raw/m ... oworld.pdf
- MIME type: "application/octet-stream" (false / the checkbox is disable - but logically, on github - it uses a "general" MIME type)

MIME type: "application/octet-stream" - see:
https://github.com/MoonchildProductions ... lg.js#L475
https://github.com/MoonchildProductions ... lg.js#L528
Last edited by GMforker on 2017-12-08, 11:59, edited 2 times in total.

dietmar

Re: "Do this automatically for files like this" doesn't

Unread post by dietmar » 2017-12-08, 11:57

GMforker wrote:Please give an example. Depends on MIME type:
Examples:
http://www.pdf995.com/samples/pdf.pdf
- MIME type: "application/pdf" (true)
I'll try to find an example. Your example above indeed works as are other pdfs included on other sites such as my own. I didn't notice before.
What does not work is pdfs generated on-the-fly from e.g my bank's server. I'm not sure if this is due to https: or due to a different MIME-type. I'll be back when I find a public site showing this effect.
Dietmar

fillerup
Lunatic
Lunatic
Posts: 495
Joined: 2014-05-19, 19:14
Location: Finland

Re: "Do this automatically for files like this" doesn't

Unread post by fillerup » 2018-09-22, 04:50

amberit wrote:You can try this addon - https://addons.mozilla.org/en-US/firefo ... matically/
doesn't work with built in downloaders e.g. DownThemAll

Lucio Chiappetti
Lunatic
Lunatic
Posts: 270
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: "Do this automatically for files like this" doesn't

Unread post by Lucio Chiappetti » 2018-09-24, 09:19

The management of Preferences->Applications in PM looks inherited from FireFox and IMHO has always been a weak point of both (mainly in the sense it does not honour mailcap). Once an entry for a MIME type or MIME-type lookalike is entered in whatever "database" there is no way to remove it (if anybody knows an add-on which does it it would be appreciated).

I have in my profile four entries tagged "Adobe Acrobat Document" (not only application/pdf but also application/binary, application/force-download and application/save). They are all set to "always ask". I did enter them sometimes via the "do this automatically" popup, mainly to cure sites which were distributing pdf files with the wrong MIME type or insisting in forcing upon you a choice it does not pertain to them. But now if somebody distributes a non-pdf file with one of those types, the offer of "always ask" is between Save and View with pdf viewer ...
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

Walter Dnes
Astronaut
Astronaut
Posts: 603
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: "Do this automatically for files like this" doesn't

Unread post by Walter Dnes » 2018-09-24, 15:30

What has always annoyed me is the fact that the "helper application" action is always based on "mime type", which webmasters seem to be too lazy/ignorant to get right. WHY doesn't Pale Moon simply go with file extension for the decision?
There's a right way
There's a wrong way
And then there's my way

yami_
Lunatic
Lunatic
Posts: 467
Joined: 2018-04-26, 11:05

Re: "Do this automatically for files like this" doesn't

Unread post by yami_ » 2018-09-24, 16:32

Off-topic:
Because an file extension is meaningless. What matters is the content of the file. Not how somebody has named it.
cat came back from Berkeley waving flags -- rob pike

Walter Dnes
Astronaut
Astronaut
Posts: 603
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: "Do this automatically for files like this" doesn't

Unread post by Walter Dnes » 2018-09-25, 02:27

yami_ wrote:
Off-topic:
Because an file extension is meaningless. What matters is the content of the file. Not how somebody has named it.
You may argue that "actual content" is more important than file extension. The sad truth is that file extension is a MUCH more reliable indicator of "actual content" than "mime-type". There are too bleeping many webmasters who are too lazy, or ignorant, or utilise brain-dead website-building-programs, all combining to give wrong/invalid mime-types.
There's a right way
There's a wrong way
And then there's my way

Lucio Chiappetti
Lunatic
Lunatic
Posts: 270
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: "Do this automatically for files like this" doesn't

Unread post by Lucio Chiappetti » 2018-09-25, 10:13

Walter Dnes wrote:What has always annoyed me is the fact that the "helper application" action is always based on "mime type", which webmasters seem to be too lazy/ignorant to get right. WHY doesn't Pale Moon simply go with file extension for the decision?
Seems a curious way of proposing a cure for what is probably a right diagnosis (wrong mime type because of human ignorance). This is not only related to webmasters (or the s/w they use) but also to MUAs (mail user agents, more than the people which use them). I sometimes receive mail (usually pdf) attachment which are declared the wrong mime type. Luckily a combination of a feature of my MUA, the fact it honours mailcap and mime-types, and the possibility to edit the latter files, allows me to get prompted "this file is recognised as xxx by file extension in contrast with mime-type yyyy: do you want to proceed" (which is a good thing for security reasons).

I wonder whether a feature like that could be inserted in PM or in an addon for PM abandoning the firefox inheritance ...
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 23629
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: "Do this automatically for files like this" doesn't

Unread post by Moonchild » 2018-09-25, 11:38

Walter Dnes wrote:WHY doesn't Pale Moon simply go with file extension for the decision?
Because the standard says so.[1]
MIME type always has first priority. Also, if this wasn't the case, it would be impossible to e.g. offer downloads of known file types (like images) because the extension would dictate that it would have to be displayed. Also, extensions are often incorrect for file content (this is why content-sniffing exists).

[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
Last edited by Moonchild on 2018-09-25, 11:39, edited 1 time in total.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne
"I'm afraid you have me mistaken for someone who can be shamed by a child." -- Quillspawn

Locked