Skip to content

Commit

Permalink
fix(Image): Do not send empty Content-Type header
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Aug 29, 2024
1 parent 80d7d86 commit 1f46be7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ public function show(?string $mimeType = null): bool {
if ($mimeType === null) {
$mimeType = $this->mimeType();
}
header('Content-Type: ' . ($mimeType ?? ''));
if ($mimeType !== null) {
header('Content-Type: ' . $mimeType);
}
return $this->_output(null, $mimeType);
}

Expand Down

0 comments on commit 1f46be7

Please sign in to comment.