From df9beabfb89449d443362bf0c75c5f19c69aee9d Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Wed, 29 May 2024 23:21:24 +0530 Subject: [PATCH] Update lib/handlers/put.js Co-authored-by: Alain Bourgeois --- lib/handlers/put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers/put.js b/lib/handlers/put.js index 76bc3b61..38ba1369 100644 --- a/lib/handlers/put.js +++ b/lib/handlers/put.js @@ -79,7 +79,7 @@ async function putStream (req, res, next, stream = req) { // Fails with Append on existing resource if (!req.originalUrl.endsWith('.acl')) await checkPermission(req, resourceExists) await ldp.put(req, stream, getContentType(req.headers)) - res.sendStatus(returnStatus) + res.sendStatus(resourceExists ? 204 : 201) return next() } catch (err) { err.message = 'Can\'t write file/folder: ' + err.message