diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/lib/Controller/IconController.php | 4 | ||||
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php index cbd243a25e0..eb51d2d799c 100644 --- a/apps/theming/lib/Controller/IconController.php +++ b/apps/theming/lib/Controller/IconController.php @@ -141,7 +141,7 @@ class IconController extends Controller { $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon.png'; /** @var FileAccessHelper */ $fileAccessHelper = \OC::$server->query(FileAccessHelper::class); - $response = new DataDisplayResponse($fileAccessHelper->file_get_contents($fallbackLogo)); + $response = new DataDisplayResponse($fileAccessHelper->file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/x-icon']); } $response->cacheFor(86400); $expires = new \DateTime(); @@ -178,7 +178,7 @@ class IconController extends Controller { $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon-touch.png'; /** @var FileAccessHelper */ $fileAccessHelper = \OC::$server->query(FileAccessHelper::class); - $response = new DataDisplayResponse($fileAccessHelper->file_get_contents($fallbackLogo)); + $response = new DataDisplayResponse($fileAccessHelper->file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/png']); } $response->cacheFor(86400); $expires = new \DateTime(); diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index d93c2259472..0a93ce1f10d 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -152,7 +152,7 @@ class IconControllerTest extends TestCase { ->method('shouldReplaceIcons') ->willReturn(false); $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon.png'; - $expected = new DataDisplayResponse(file_get_contents($fallbackLogo), Http::STATUS_OK); + $expected = new DataDisplayResponse(file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/x-icon']); $expected->cacheFor(86400); $expires = new \DateTime(); $expires->setTimestamp($this->timeFactory->getTime()); @@ -201,7 +201,7 @@ class IconControllerTest extends TestCase { ->method('shouldReplaceIcons') ->willReturn(false); $fallbackLogo = \OC::$SERVERROOT . '/core/img/favicon-touch.png'; - $expected = new DataDisplayResponse(file_get_contents($fallbackLogo), Http::STATUS_OK); + $expected = new DataDisplayResponse(file_get_contents($fallbackLogo), Http::STATUS_OK, ['Content-Type' => 'image/png']); $expected->cacheFor(86400); $expires = new \DateTime(); $expires->setTimestamp($this->timeFactory->getTime()); |