From 1ae11679916b18fcced93c11104b7aed53bd35a2 Mon Sep 17 00:00:00 2001 From: Christoph FRITZ Date: Thu, 30 Nov 2023 16:41:11 +0100 Subject: [PATCH] refactor: update ECMA script types Some ECMA script mime types were obsoleted in favor of 'text/javascript'. For a full reference check RFC 9239 (https://www.ietf.org/rfc/rfc9239.pdf). --- src/mime_types.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mime_types.rs b/src/mime_types.rs index b6215ad..c7156f9 100644 --- a/src/mime_types.rs +++ b/src/mime_types.rs @@ -315,7 +315,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("ecelp4800", &["audio/vnd.nuera.ecelp4800"]), ("ecelp7470", &["audio/vnd.nuera.ecelp7470"]), ("ecelp9600", &["audio/vnd.nuera.ecelp9600"]), - ("ecma", &["application/ecmascript"]), + ("ecma", &["text/javascript"]), ("edm", &["application/vnd.novadigm.edm"]), ("edx", &["application/vnd.novadigm.edx"]), ("efif", &["application/vnd.picsel"]), @@ -329,7 +329,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("eot", &["application/vnd.ms-fontobject"]), ("eps", &["application/postscript"]), ("epub", &["application/epub+zip"]), - ("es", &["application/ecmascript"]), + ("es", &["text/javascript"]), ("es3", &["application/vnd.eszigno3+xml"]), ("esa", &["application/vnd.osgi.subsystem"]), ("esf", &["application/vnd.epson.esf"]), @@ -559,13 +559,13 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("jpgv", &["video/jpeg"]), ("jpm", &["image/jpm"]), ("jpx", &["image/jpx"]), - ("js", &["application/javascript"]), - ("jsm", &["application/javascript"]), + ("js", &["text/javascript"]), + ("jsm", &["text/javascript"]), ("json", &["application/json"]), ("json5", &["application/json5"]), ("jsonld", &["application/ld+json"]), ("jsonml", &["application/jsonml+json"]), - ("jsx", &["text/jscript"]), + ("jsx", &["text/javascript"]), ("jsxbin", &["text/plain"]), ("kar", &["audio/midi"]), ("karbon", &["application/vnd.kde.karbon"]),