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:
parent
309763397f
commit
143be85416
10 changed files with 56 additions and 38 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue