Return 412 for If-Match on a missing source instead of creating it
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 64/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
从 src/storage/version/put.js 开始,追踪 If-Match 请求头在选择创建路径之前是在哪里解析的;需要新增 412 返回的是源不存在的分支。阅读周围的条件请求处理代码,确认 If-Match: * 和 If-None-Match: * 保持当前行为,然后在现有存储版本 PUT 测试旁边添加一个测试,覆盖针对不存在源的特定 ETag 情况。完成标准是:该请求返回 412 且不写入任何内容,并且仅创建的路径保持不变。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- JavaScript
- 星标
- 6
- 派生
- 18
- 平均合并
- 5 小时 12 分钟
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
adobe/da-admin 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 62/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
speakeasy-api/speakeasy#2159 ·
维护者通常 1 天内回复
-
Queued deferred selectors still run after unmount可能已有人在做 @LexaTang 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
ianstormtaylor/slate#6375 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
oleeskild/digitalgarden#435 ·
-
broken-links
难度 2/5 1-3 小时 新手友好度 78/100
ShaftHQ/shafthq.github.io#1201 ·
维护者通常 1 天内回复