Merge pull request #49851 from nextcloud/backport/49839/stable30

[stable30] fix: return 204 instead of 404
This commit is contained in:
Sebastian Krupinski 2024-12-13 16:53:38 -05:00 committed by GitHub
commit 828594cdd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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);