nodeSolidServer / nodeSolidServer/node-solid-server
Support the `If-None-Match` header
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Expected behaviour
POSTa resource to an IRI where a resource already exists, with theIf-None-Matchheader set.- The server returns 412, and the original resource is unchanged.
Actual behaviour
POSTa resource to an IRI where a resource already exists, with theIf-None-Matchheader set.- The server returns
201 Created, and the original resource is overwritten.
Additional context
When receiving a resource creation request (i.e. POST or PUT, possibly PATCH?), if the If-None-Match header is set, the server should perform a check to ensure that no resource is already stored at the target IRI.
In the case of POST, since the Slug header is meant to be a hint and not a hard constraint, I'm not sure what the behaviour should be, but when PUTting a resource to an IRI where a resource already exists, an If-None-Match request should fail with 412.
Open question
When only having write (but not read) access to a container, can this be used to exfiltrate information one should not be allowed to access ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the server's POST and PUT request handling and its conditional-header processing, then review the existing behavior around If-None-Match. Done means the requested 412/no-overwrite behavior is covered, with the POST/Slug and write-only access questions resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100