🐛 bug: fix Content-Length header

main
_ 2022-04-09 20:47:46 +00:00
parent 800dbcb019
commit 4c8521c50a
1 changed files with 2 additions and 0 deletions

View File

@ -219,6 +219,8 @@ async fn serve_file (
response.header ("content-type".into (), b"application/javascript".to_vec ()); 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); response.content_length = Some (content_length);
if let Some (body) = body { if let Some (body) = body {