text/plain default content type

This commit is contained in:
Paul Zinselmeyer 2023-04-20 15:05:40 +02:00
parent 0f5e846def
commit d635797394

View file

@ -241,7 +241,12 @@ async fn get_item(
let mut headers = HeaderMap::new(); let mut headers = HeaderMap::new();
headers.insert( headers.insert(
header::CONTENT_TYPE, header::CONTENT_TYPE,
metadata.mimetype.as_deref().unwrap_or("").parse().unwrap(), metadata
.mimetype
.as_deref()
.unwrap_or("text/plain")
.parse()
.unwrap(),
); );
headers.insert( headers.insert(
header::CONTENT_LENGTH, header::CONTENT_LENGTH,