Skip to content

Commit f296d19

Browse files
committed
fix(Image): Do not send empty Content-Type header
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 8e806d6 commit f296d19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/private/Image.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ public function show(?string $mimeType = null): bool {
166166
if ($mimeType === null) {
167167
$mimeType = $this->mimeType();
168168
}
169-
header('Content-Type: ' . ($mimeType ?? ''));
169+
if ($mimeType !== null) {
170+
header('Content-Type: ' . $mimeType);
171+
}
170172
return $this->_output(null, $mimeType);
171173
}
172174

0 commit comments

Comments
 (0)