Return 412 for If-Match on a missing source instead of creating it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start in src/storage/version/put.js and trace where the If-Match header is parsed before the create path is chosen; the missing-source branch is what needs the new 412 return. Read the surrounding conditional-request handling to confirm If-Match: * and If-None-Match: * keep their current behaviour, then add a test next to the existing storage version PUT tests covering a specific ETag against a missing source. Done means that request returns 412 with no write, and the create-only path is unchanged.
Written by the indexing model from the issue text.
Description
In src/storage/version/put.js, a PUT with a specific If-Match: <etag> on a missing source falls into the create path and creates it. A writer that expects to update a page re-creates it after someone deleted it.
Change
- A specific
If-Match: <etag>on a missing source →412, no write. If-Match: *on a missing source →412(already true today).
Compatibility: technically breaking, but only for requests that already break HTTP semantics: If-Match with an ETag must fail when the resource doesn't exist (RFC 9110 §13.1.1). Callers that mean "create or overwrite" send no condition, and "create only" sends If-None-Match: *; neither changes. A search of first-party repos (2026-11-22) found no affected client; da-collab sends If-Match: *, which already returns 412 here.
Before switching, log every If-Match: <etag> on a missing source in production for a few weeks. With no real hits, switch with a release note; otherwise the log shows which callers to contact first.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 18
- Avg merge
- 5h 12m
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from adobe/da-admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
adobe/da-admin#305 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day
-
Queued deferred selectors still run after unmountPossibly taken @LexaTang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ianstormtaylor/slate#6375 ·
Maintainers usually reply within 1 day
-
sync cache dist/imgOpen
Difficulty 1/5 Under an hour Newbie friendliness 82/100
oleeskild/digitalgarden#435 ·
-
broken-links
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ShaftHQ/shafthq.github.io#1201 ·
Maintainers usually reply within 1 day