[whatwg] Priority between <a download> and content-disposition

Nils Dagsson Moskopp nils at dieweltistgarnichtso.net
Tue Mar 19 07:31:46 PDT 2013


Roger Hågensen <rescator at emsai.net> schrieb am Tue, 19 Mar 2013
14:31:15 +0100:

> […]

> What should be shown if there is an issue/conflict?
> 
> Maybe:
> Download "https://example.com/reports/1/xml/" as "report1.xml" ?
> WARNING! File identified as actually being an executable! (*.exe)

At least here on Debian GNU/Linux, executables have no file extension.
Besides that, what would be the MIME type of windows executables?

> Or:
> Download "https://example.com/reports/1/xml/" as "report1.xml" ?
> NOTE! File identified as not being a xml, appears to be text. (*.txt)

So, what about polyglots?
<http://linux-hacks.blogspot.de/2009/02/theory-behind-hiding-zipped-file-under.html>

> […]

> The key though is showing: Download "url" as "file.ext" ?
> And in cases where a quick file header scan reveals a possible issue
> (or simply wrong fileformat extension) either a notice or warning
> text in addition.
> But this is only if the user actually hose "Save As" in the download 
> dialog, they might have chosen "Share on facebook" or "Print" or
> "Email to..." or even "Open"
> a similar but different dialog would obviously be needed in that case.

I find all of this approach insanely complex for a negligible benefit.

-- 
Nils Dagsson Moskopp // erlehmann
<http://dieweltistgarnichtso.net>



More information about the whatwg mailing list