From cd995ccba8c65c6d9c1b16aa714c90a74929ffb9 Mon Sep 17 00:00:00 2001 From: zyl Date: Tue, 29 Oct 2024 11:06:15 -0700 Subject: [PATCH] fix serving non-text files --- src/serving.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serving.rs b/src/serving.rs index a6c2a9b..780519a 100644 --- a/src/serving.rs +++ b/src/serving.rs @@ -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(); }