aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-08-29 10:06:20 +0200
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-08-29 17:06:32 +0200
commit1f46be7d69ad54c58366c4322fb2b3b99585d97f (patch)
tree9ce4dfb94f9f4ae5c1706c33a2d86eb0e4be0361 /lib
parent80d7d867bd6a3d69064d5a47ef41200f6ebd170a (diff)
downloadnextcloud-server-1f46be7d69ad54c58366c4322fb2b3b99585d97f.tar.gz
nextcloud-server-1f46be7d69ad54c58366c4322fb2b3b99585d97f.zip
fix(Image): Do not send empty Content-Type header
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Image.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Image.php b/lib/private/Image.php
index ca5058e6c65..39624612560 100644
--- a/lib/private/Image.php
+++ b/lib/private/Image.php
@@ -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);
}