fix: force octet-stream for attachment downloads (#5942)
This commit is contained in:
1 parent
f5e0c4e2e1
commit
103acd15fe
2 files changed
+9
No files matched your search
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user