fix serving non-text files

This commit is contained in:
zyl 2024-10-29 11:06:15 -07:00
parent 19ffac4a90
commit cd995ccba8
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs

View file

@ -284,7 +284,7 @@ impl Site {
if p.exists() {
let mut res = Response::new("".into());
match std::fs::read_to_string(&p) {
match std::fs::read(&p) {
Ok(body) => {
*res.body_mut() = body.into();
}