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.
This commit is contained in:
Winni Neessen 2024-11-26 16:38:30 +01:00
parent f61da9cc2e
commit 06bee90a1e
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -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)
}