summaryrefslogtreecommitdiff
path: root/uriloader
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-01-19 13:40:15 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-13 15:44:41 +0200
commit981154dc488f3412129a6fa8b7744cdf8a24a4ff (patch)
treec9b84c2f7f16166ee8e9d62ef92de1097438e763 /uriloader
parenta0da6b5b68c644003c84e1258b15029369c1b0a9 (diff)
downloaduxp-981154dc488f3412129a6fa8b7744cdf8a24a4ff.tar.gz
[network] Add non-overrideable default MIME types for js, jsm and json.
This ensures the browser always recognizes these file type extensions appropriately, even if not otherwise registered in the system.
Diffstat (limited to 'uriloader')
-rw-r--r--uriloader/exthandler/nsExternalHelperAppService.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index 02a555f04c..dc7d200041 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -384,6 +384,9 @@ static const nsDefaultMimeTypeEntry defaultMimeEntries[] =
{ "application/xhtml+xml", "xhtml" },
{ "application/xhtml+xml", "xht" },
{ TEXT_PLAIN, "txt" },
+ { APPLICATION_JSON, "json"},
+ { APPLICATION_XJAVASCRIPT, "js"},
+ { APPLICATION_XJAVASCRIPT, "jsm"},
{ VIDEO_OGG, "ogv" },
{ VIDEO_OGG, "ogg" },
{ APPLICATION_OGG, "ogg" },