🐛 bug: fix Content-Length header
parent
800dbcb019
commit
4c8521c50a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue