From 9d981f921094787b4ab3003f0ed58ce45ba04126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Fri, 8 Nov 2024 12:06:21 +0100 Subject: [PATCH] http: Fix encoding issue in raw file handler Turns out "content-type: text; charset=utf-8" wasn't valid, it had to be "content-type: text/plain; charset=utf-8" for browsers to recognise it properly. --- radicle-httpd/src/raw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicle-httpd/src/raw.rs b/radicle-httpd/src/raw.rs index e3287bb6b..c673cd035 100644 --- a/radicle-httpd/src/raw.rs +++ b/radicle-httpd/src/raw.rs @@ -158,7 +158,7 @@ fn blob_response( MIMES .binary_search_by(|(k, _)| k.cmp(&ext)) .map(|k| MIMES[k].1) - .unwrap_or("text; charset=utf-8") + .unwrap_or("text/plain; charset=utf-8") } else { "application/octet-stream" };