send content type for index

This commit is contained in:
soruh 2023-11-21 13:12:02 +01:00
parent 5484140688
commit eb94d310e8

View File

@ -52,6 +52,7 @@ fn index(req: &Request<Body>) -> Result<Response<Body>, hyper::http::Error> {
if accepts_gzip { if accepts_gzip {
response response
.header(CONTENT_ENCODING, "gzip") .header(CONTENT_ENCODING, "gzip")
.header(CONTENT_TYPE, "text/html")
.body(Body::from(COMPRESSED_HTML)) .body(Body::from(COMPRESSED_HTML))
} else { } else {
let (mut sender, body) = Body::channel(); let (mut sender, body) = Body::channel();