add RSS content-type

main
_ 2025-01-29 16:02:08 +00:00
parent 5965a76c75
commit bf4bf622ed
1 changed files with 3 additions and 0 deletions

View File

@ -223,6 +223,9 @@ async fn serve_file (
else if uri.ends_with (".html") {
response.header ("content-type".into (), b"text/html; charset=UTF-8".to_vec ());
}
else if uri.ends_with (".rss") {
response.header ("content-type".into (), b"application/rss+xml".to_vec());
}
response.header ("content-length".into (), content_length.to_string ().into_bytes ());