From 3bd5dff44a4b5debf97b8697fee7668662fd5d90 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Sat, 30 Aug 2025 13:52:50 +0200 Subject: [PATCH] early errors: set the charset in http headers --- src/webserver/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webserver/http.rs b/src/webserver/http.rs index 211e73d8..d4edc560 100644 --- a/src/webserver/http.rs +++ b/src/webserver/http.rs @@ -231,7 +231,7 @@ fn anyhow_err_to_actix_resp(e: &anyhow::Error, env: app_config::DevOrProd) -> Ht } resp.insert_header(( header::CONTENT_TYPE, - header::HeaderValue::from_static("text/plain"), + header::HeaderValue::from_static("text/plain; charset=utf-8"), )); if let Some(status_err @ &ErrorWithStatus { .. }) = e.downcast_ref() {