From 33f73b4d821a3cd09614533d592f102166963cc5 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 26 May 2022 01:32:23 -0400 Subject: [multiple] application/javascript text/javascript translate MIME type "application/javascript" to "text/javascript" (if required, type may still be overwritten by mod_setenv or mod_magnet) x-ref: "Updates to ECMAScript Media Types" https://www.rfc-editor.org/rfc/rfc9239 --- doc/config/conf.d/mime.conf | 3 ++- doc/scripts/create-mime.conf.pl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/config/conf.d/mime.conf b/doc/config/conf.d/mime.conf index 3e0abef2..6daffd6e 100644 --- a/doc/config/conf.d/mime.conf +++ b/doc/config/conf.d/mime.conf @@ -113,7 +113,6 @@ mimetype.assign = ( ".inkml" => "application/inkml+xml", ".ipfix" => "application/ipfix", ".its" => "application/its+xml", - ".js" => "application/javascript", ".jrd" => "application/jrd+json", ".json" => "application/json", ".json-patch" => "application/json-patch+json", @@ -1223,6 +1222,8 @@ mimetype.assign = ( ".htm" => "text/html", ".html" => "text/html", ".sandboxed" => "text/html-sandboxed", + ".js" => "text/javascript", + ".mjs" => "text/javascript", ".cnd" => "text/jcr-cnd", ".markdown" => "text/markdown;charset=utf-8", ".md" => "text/markdown;charset=utf-8", diff --git a/doc/scripts/create-mime.conf.pl b/doc/scripts/create-mime.conf.pl index d38e996d..72a0fcf7 100755 --- a/doc/scripts/create-mime.conf.pl +++ b/doc/scripts/create-mime.conf.pl @@ -171,6 +171,10 @@ while () { # from http://www.iana.org/assignments/media-types/media-types.xhtml add(".dtd", "application/xml-dtd"); +# RFC 9239 +add(".js", "text/javascript"); +add(".mjs", "text/javascript"); + # other useful mappings my %useful = ( ".tar.gz" => "application/x-gtar-compressed", -- cgit v1.2.1