Skip to content

Commit

Permalink
Recognize media types without explicit charset (ordinals#2349)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Aug 21, 2023
1 parent d091341 commit 22e2348
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ impl Media {
("model/gltf-binary", Media::Unknown, &["glb"]),
("model/stl", Media::Unknown, &["stl"]),
("text/css", Media::Text, &["css"]),
("text/html", Media::Iframe, &[]),
("text/html;charset=utf-8", Media::Iframe, &["html"]),
("text/javascript", Media::Text, &["js"]),
("text/plain;charset=utf-8", Media::Text, &["txt"]),
("text/markdown", Media::Text, &[]),
("text/markdown;charset=utf-8", Media::Text, &["md"]),
("text/plain", Media::Text, &[]),
("text/plain;charset=utf-8", Media::Text, &["txt"]),
("video/mp4", Media::Video, &["mp4"]),
("video/webm", Media::Video, &["webm"]),
];
Expand Down

0 comments on commit 22e2348

Please sign in to comment.