-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
☀️ enhancementNew feature or requestNew feature or request
Description
Environment
- Server version: 7.1.7
- Node.js version: v24.2.0
- npm version: 11.3.0
Description
A PUT request completely deletes file contents on server side before all data has been successfully processed. This can lead to a complete data loss of the respective file on slow / unreliable internet connections.
To reproduce:
- setup a local CSS server and setup a pod with a markdown document, e.g.
/alice/markdown.md - write some content to this document
- use browser dev tools to throttle internet. I tested with these settings in chrome:
- Download 5 kbit/s
- Upload 3 kbit/s
- Latency 300ms
- Packet loss 5%
- Packet length queue 3
- make a PUT request to write new content to the file, e.g.
fetch("http://localhost:3000/alice/markdown.md", {
"headers": {
"content-type": "text/markdown",
},
"body": "some markdown content, propably not too short to have some data to process",
"method": "PUT"
});
Actual behaviour:
- As soon as the PUT request reaches the server the markdown file is completely cleared from existing content
- The fetch is still
pendingdue to the bad connection - server responds with status
500 - new file content is not saved, the old content is lost
Logs from CSS:
2025-10-22T15:29:33.396Z [HandlerServerConfigurator] {Primary} info: Received PUT request for /alice/markdown.md
2025-10-22T15:29:33.399Z [DPoPWebIdExtractor] {Primary} info: Verified WebID via DPoP-bound access token. [...]
2025-10-22T15:29:33.402Z [WebAclReader] {Primary} info: Found applicable ACL document [...]
2025-10-22T15:29:39.407Z [WrappedExpiringReadWriteLocker] {Primary} error: Lock expired after 6000ms on http://localhost:3000/alice/markdown.md
Expected behaviour
Either the new content should be saved successfully or the old content should still be present.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
☀️ enhancementNew feature or requestNew feature or request