|
@@ -53,6 +53,7 @@ impl MimeType {
|
|
Some("js") => Self::Js,
|
|
Some("js") => Self::Js,
|
|
Some("json") => Self::Json,
|
|
Some("json") => Self::Json,
|
|
Some("jsonld") => Self::Jsonld,
|
|
Some("jsonld") => Self::Jsonld,
|
|
|
|
+ Some("mjs") => Self::Js,
|
|
Some("rtf") => Self::Rtf,
|
|
Some("rtf") => Self::Rtf,
|
|
Some("svg") => Self::Svg,
|
|
Some("svg") => Self::Svg,
|
|
Some("mp4") => Self::Mp4,
|
|
Some("mp4") => Self::Mp4,
|
|
@@ -115,6 +116,9 @@ mod tests {
|
|
let jsonld: String = MimeType::parse_from_uri("https:/example.com/hello.jsonld").to_string();
|
|
let jsonld: String = MimeType::parse_from_uri("https:/example.com/hello.jsonld").to_string();
|
|
assert_eq!(jsonld, String::from("application/ld+json"));
|
|
assert_eq!(jsonld, String::from("application/ld+json"));
|
|
|
|
|
|
|
|
+ let mjs: String = MimeType::parse_from_uri("https://example.com/bundled.mjs").to_string();
|
|
|
|
+ assert_eq!(mjs, String::from("text/javascript"));
|
|
|
|
+
|
|
let rtf: String = MimeType::parse_from_uri("https://example.com/document.rtf").to_string();
|
|
let rtf: String = MimeType::parse_from_uri("https://example.com/document.rtf").to_string();
|
|
assert_eq!(rtf, String::from("application/rtf"));
|
|
assert_eq!(rtf, String::from("application/rtf"));
|
|
|
|
|