From 497086cb654bb4d5769223f4c1e740d13189443b Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Fri, 30 Jun 2023 22:18:39 +1200 Subject: [PATCH] API: Set raw message Content-Type to UTF-8 --- server/apiv1/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/apiv1/api.go b/server/apiv1/api.go index 0dfbed7..ed1128f 100644 --- a/server/apiv1/api.go +++ b/server/apiv1/api.go @@ -304,7 +304,7 @@ func DownloadRaw(w http.ResponseWriter, r *http.Request) { return } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") if dl == "1" { w.Header().Set("Content-Disposition", "attachment; filename=\""+id+".eml\"") } @@ -495,7 +495,7 @@ func SetTags(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte("ok")) } -// ReleaseMessage (method: POST) will release a message via a preconfigured external SMTP server. +// ReleaseMessage (method: POST) will release a message via a pre-configured external SMTP server. // If no IDs are provided then all messages are updated. func ReleaseMessage(w http.ResponseWriter, r *http.Request) { // swagger:route POST /api/v1/message/{ID}/release message Release