aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastianKrupinski <krupinskis05@gmail.com>2024-12-12 23:06:01 -0500
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-12-13 17:33:21 +0000
commit69d655d1647f30e311be9fe3ee0f6b88218eb3ca (patch)
tree7c7d7c4e2d22299923e093f022ffc944a16bf090
parentf7020aa5c78ef56df953b8ca6e0a96c9a78593a4 (diff)
downloadnextcloud-server-backport/49839/stable29.tar.gz
nextcloud-server-backport/49839/stable29.zip
fix: return 204 instead of 404backport/49839/stable29
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
-rw-r--r--apps/dav/lib/CardDAV/ImageExportPlugin.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php
index 3ebc91e5533..542d8c88c5a 100644
--- a/apps/dav/lib/CardDAV/ImageExportPlugin.php
+++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php
@@ -108,7 +108,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 6f48927646e..deda3d2427c 100644
--- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php
+++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php
@@ -189,7 +189,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);