From 06bee90a1ea068fe7d5a56463c74d06bf9715847 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Tue, 26 Nov 2024 16:38:30 +0100 Subject: [PATCH] Remove charset from octet-stream Content-Type on FreeBSD The charset parameter in the Content-Type header for octet-stream files on FreeBSD was removed. This aligns the behavior with the expected MIME type format for such files. Other platforms remain unchanged. --- msgwriter_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msgwriter_test.go b/msgwriter_test.go index 3fd158c..2c11406 100644 --- a/msgwriter_test.go +++ b/msgwriter_test.go @@ -351,7 +351,7 @@ func TestMsgWriter_addFiles(t *testing.T) { cdExpect := fmt.Sprintf(`Content-Disposition: attachment; filename="%s"`, tt.expect) switch runtime.GOOS { case "freebsd": - ctExpect = fmt.Sprintf(`Content-Type: application/octet-stream; charset=utf-8; name="%s"`, tt.expect) + ctExpect = fmt.Sprintf(`Content-Type: application/octet-stream; name="%s"`, tt.expect) default: ctExpect = fmt.Sprintf(`Content-Type: text/plain; charset=utf-8; name="%s"`, tt.expect) }