From d635797394325249c04829d7987b5de146e706b2 Mon Sep 17 00:00:00 2001 From: Paul Z Date: Thu, 20 Apr 2023 15:05:40 +0200 Subject: [PATCH] text/plain default content type --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 35bd024..b0040fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -241,7 +241,12 @@ async fn get_item( let mut headers = HeaderMap::new(); headers.insert( header::CONTENT_TYPE, - metadata.mimetype.as_deref().unwrap_or("").parse().unwrap(), + metadata + .mimetype + .as_deref() + .unwrap_or("text/plain") + .parse() + .unwrap(), ); headers.insert( header::CONTENT_LENGTH,