Skip to content

Commit

Permalink
Update lib/handlers/put.js
Browse files Browse the repository at this point in the history
Co-authored-by: Alain Bourgeois <alain.bourgeois10@gmail.com>
  • Loading branch information
CxRes and bourgeoa committed May 29, 2024
1 parent 12d3405 commit df9beab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlers/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df9beab

Please sign in to comment.