check that the w30 app is actually an zip-archive with an index.html

This commit is contained in:
B. Petersen
2021-12-28 17:54:06 +01:00
committed by bjoern
parent bd988d805c
commit b656a60234
10 changed files with 195 additions and 18 deletions

View File

@@ -1168,7 +1168,7 @@ pub fn guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)> {
"ttf" => (Viewtype::File, "font/ttf"),
"vcard" => (Viewtype::File, "text/vcard"),
"vcf" => (Viewtype::File, "text/vcard"),
"w30" => (Viewtype::W30, "application/html+w30"),
"w30" => (Viewtype::W30, "application/w30+zip"),
"wav" => (Viewtype::File, "audio/wav"),
"weba" => (Viewtype::File, "audio/webm"),
"webm" => (Viewtype::Video, "video/webm"),
@@ -1705,7 +1705,7 @@ mod tests {
);
assert_eq!(
guess_msgtype_from_suffix(Path::new("foo/file.w30")),
Some((Viewtype::W30, "application/html+w30"))
Some((Viewtype::W30, "application/w30+zip"))
);
}