From 4c8521c50a4e2a2a80e9971c44cc88f9b1f39e82 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sat, 9 Apr 2022 20:47:46 +0000 Subject: [PATCH] :bug: bug: fix Content-Length header --- crates/ptth_server/src/file_server.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ptth_server/src/file_server.rs b/crates/ptth_server/src/file_server.rs index 68aaf62..6c7033e 100644 --- a/crates/ptth_server/src/file_server.rs +++ b/crates/ptth_server/src/file_server.rs @@ -219,6 +219,8 @@ async fn serve_file ( response.header ("content-type".into (), b"application/javascript".to_vec ()); } + response.header ("content-length".into (), content_length.to_string ().into_bytes ()); + response.content_length = Some (content_length); if let Some (body) = body {