🐛 bug: also hack in content-type for HTML pages
parent
292ade0f46
commit
a838d80d38
|
@ -220,6 +220,9 @@ async fn serve_file (
|
|||
if uri.ends_with (".js") {
|
||||
response.header ("content-type".into (), b"application/javascript".to_vec ());
|
||||
}
|
||||
else if uri.ends_with (".html") {
|
||||
response.header ("content-type".into (), b"text/html; charset=UTF-8".to_vec ());
|
||||
}
|
||||
|
||||
response.header ("content-length".into (), content_length.to_string ().into_bytes ());
|
||||
|
||||
|
|
Loading…
Reference in New Issue