From bca191c2b9e2cf65195bd9226fb1eeb8b47db822 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 19 Jan 2022 13:40:15 +0000 Subject: [PATCH] [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. --- uriloader/exthandler/nsExternalHelperAppService.cpp | 3 +++ 1 file changed, 3 insertions(+) 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" },