fix: force octet-stream for attachment downloads (#5942)

This commit is contained in:
mehmet turac authored and GitHub committed 2026-06-03 11:59:17 +02:00
1 parent f5e0c4e2e1
commit 103acd15fe
2 files changed
+9

No files matched your search

+8
View File
@@ -70,6 +70,14 @@ func TestSetContentDisposition(t *testing.T) {
if got != tc.expected {
t.Errorf("Content-Disposition = %q, want %q", got, tc.expected)
}
contentType := recorder.Header().Get("Content-Type")
if tc.inline && contentType != "" {
t.Errorf("Content-Type = %q, want empty", contentType)
}
if !tc.inline && contentType != "application/octet-stream" {
t.Errorf("Content-Type = %q, want application/octet-stream", contentType)
}
})
}
}