AppCore icon indicating copy to clipboard operation
AppCore copied to clipboard

MIME type of .js file on Windows is text/plain (sometimes?)

Open p0358 opened this issue 1 year ago • 0 comments

[GetFileMimeType] Bin/launcher-ui/js/app.js = text/plain
[GetFileMimeType] Bin/launcher-ui/css/main.css = text/css
[Ultralight] [Console]: [JS] [Error] TypeError: 'text/plain' is not a valid JavaScript MIME type. (@1:11)

I see the default platform filesystem implementation on Windows uses registry to check for MIME type. However... image

Turns out on some systems it's actually set to text/plain for .js files in the registry! I'd propose adding some hardcoded mapping for the most common web extensions, especially that WebCore will refuse to load a .js file with wrong MIME type, apparently, unlike Firefox and Chromium. I guess either that or make a patch to ignore wrong MIME type for JS files?

p0358 avatar Dec 05 '22 15:12 p0358