Issue #3284133 by mondrake, alexpott: IETF RFC 9239 requires Javascript MIME type to be text/javascript

merge-requests/3363/head
Alex Pott 2023-02-01 17:25:12 +00:00
parent 6a9f48d093
commit 58caf0f237
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
3 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,7 @@ class ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface {
129 => 'application/x-iphone',
130 => 'application/x-iso9660-image',
131 => 'application/x-java-jnlp-file',
132 => 'application/javascript',
132 => 'text/javascript',
133 => 'application/x-jmol',
134 => 'application/x-kchart',
135 => 'application/x-killustrator',
@ -860,6 +860,7 @@ class ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface {
'webm' => 357,
'vtt' => 358,
'gz' => 359,
'mjs' => 132,
'aac' => 360,
],
];

View File

@ -1204,6 +1204,7 @@ function file_icon_map($mime_type) {
case 'application/x-php':
case 'application/x-ruby':
case 'application/x-shellscript':
case 'text/javascript':
case 'text/vnd.wap.wmlscript':
case 'text/x-emacs-lisp':
case 'text/x-haskell':

View File

@ -18,7 +18,7 @@ class JsAssetController extends AssetControllerBase {
/**
* {@inheritdoc}
*/
protected string $contentType = 'application/javascript';
protected string $contentType = 'text/javascript';
/**
* {@inheritdoc}