diff options
author | Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> | 2024-12-13 16:53:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 16:53:38 -0500 |
commit | 828594cdd42c3ecaacd2d302ec09d45f52e9bbd3 (patch) | |
tree | beb3a4fcd0d1f0757f2ccb1cef6265e1d99e0c37 | |
parent | 0475b0c1b848d2b3860c571c8508fcddba35aae0 (diff) | |
parent | 2f46f9801b109e0ce4dd1ab1c95d748568b73415 (diff) | |
download | nextcloud-server-828594cdd42c3ecaacd2d302ec09d45f52e9bbd3.tar.gz nextcloud-server-828594cdd42c3ecaacd2d302ec09d45f52e9bbd3.zip |
Merge pull request #49851 from nextcloud/backport/49839/stable30
[stable30] fix: return 204 instead of 404
-rw-r--r-- | apps/dav/lib/CardDAV/ImageExportPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php index f8c2b6ee827..e2173db519b 100644 --- a/apps/dav/lib/CardDAV/ImageExportPlugin.php +++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php @@ -91,7 +91,7 @@ class ImageExportPlugin extends ServerPlugin { $response->setBody($file->getContent()); } catch (NotFoundException $e) { - $response->setStatus(404); + $response->setStatus(\OCP\AppFramework\Http::STATUS_NO_CONTENT); } return false; diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index 6718153f910..cf6ddb1ff7b 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -171,7 +171,7 @@ class ImageExportPluginTest extends TestCase { ->willThrowException(new NotFoundException()); $this->response->expects($this->once()) ->method('setStatus') - ->with(404); + ->with(\OCP\AppFramework\Http::STATUS_NO_CONTENT); } $result = $this->plugin->httpGet($this->request, $this->response); |