mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 20:45:29 +00:00
Switch to fork of tree_magic
This commit is contained in:
parent
c4aa71836b
commit
59c921c5d5
3 changed files with 86 additions and 75 deletions
|
|
@ -135,7 +135,7 @@ async fn send_response<W: Write + Unpin>(url: &Url, mut stream: W) -> Result {
|
|||
if path.extension() == Some(OsStr::new("gmi")) {
|
||||
stream.write_all(b"20 text/gemini\r\n").await?;
|
||||
} else {
|
||||
let mime = tree_magic::from_u8(&body);
|
||||
let mime = tree_magic_mini::from_u8(&body);
|
||||
let header = format!("20 {}\r\n", mime);
|
||||
stream.write_all(header.as_bytes()).await?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue