support gmi extension when guessing mime types

Closes #12
This commit is contained in:
panicbit 2020-11-15 22:02:57 +01:00
parent d3f65f2fc2
commit 987621cca9
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ pub fn guess_mime_from_path<P: AsRef<Path>>(path: P) -> Mime {
let extension = path.extension().and_then(|s| s.to_str());
let mime = match extension {
Some(extension) => match extension {
"gemini" => GEMINI_MIME_STR,
"gemini" | "gmi" => GEMINI_MIME_STR,
"txt" => "text/plain",
"jpeg" | "jpg" | "jpe" => "image/jpeg",
"png" => "image/png",