fix(Image): Do not send empty Content-Type header

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-08-29 10:06:20 +02:00 committed by Côme Chilliet
parent 80d7d867bd
commit 1f46be7d69

View file

@ -166,7 +166,9 @@ class Image implements IImage {
if ($mimeType === null) {
$mimeType = $this->mimeType();
}
header('Content-Type: ' . ($mimeType ?? ''));
if ($mimeType !== null) {
header('Content-Type: ' . $mimeType);
}
return $this->_output(null, $mimeType);
}