aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Upload/ChunkingPlugin.php
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-12-16 10:36:17 +0100
committerGitHub <noreply@github.com>2024-12-16 10:36:17 +0100
commit7c59119c03c491f3534021b7011adfebf6e27b19 (patch)
tree1cf550182345dbbafabedae4b7f4d6d53cb10651 /apps/dav/lib/Upload/ChunkingPlugin.php
parentace16c1d47b32ba16d0d61cbf431b187ef5ddca1 (diff)
parent36d6b0f1e6eae58e20f35bb9d87671d338ea0a61 (diff)
downloadnextcloud-server-7c59119c03c491f3534021b7011adfebf6e27b19.tar.gz
nextcloud-server-7c59119c03c491f3534021b7011adfebf6e27b19.zip
Merge pull request #49867 from nextcloud/useHttpFramework
refactor: Use Http framework where possible
Diffstat (limited to 'apps/dav/lib/Upload/ChunkingPlugin.php')
-rw-r--r--apps/dav/lib/Upload/ChunkingPlugin.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php
index cf4d65168cc..8cc8f7d6c61 100644
--- a/apps/dav/lib/Upload/ChunkingPlugin.php
+++ b/apps/dav/lib/Upload/ChunkingPlugin.php
@@ -9,6 +9,7 @@ namespace OCA\DAV\Upload;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
+use OCP\AppFramework\Http;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
@@ -89,7 +90,7 @@ class ChunkingPlugin extends ServerPlugin {
$response = $this->server->httpResponse;
$response->setHeader('Content-Length', '0');
- $response->setStatus($fileExists ? 204 : 201);
+ $response->setStatus($fileExists ? Http::STATUS_NO_CONTENT : Http::STATUS_CREATED);
return false;
}