add explicit content types to VFS

this allows us to serve a precise Content-Type header for all our pages, rendering treehouse usable in browsers that require one
(like terminal browsers---w3m, lynx)
This commit is contained in:
りき萌 2025-01-14 23:09:01 +01:00
parent 309763397f
commit 143be85416
10 changed files with 56 additions and 38 deletions

View file

@ -1,7 +1,7 @@
use treehouse::vfs::{entries, query, BufferedFile, Content, VPath};
fn vfs() -> BufferedFile {
BufferedFile::new(b"hewwo :3".to_vec())
BufferedFile::new(Content::new("text/plain", b"hewwo :3".to_vec()))
}
#[test]