Assert If-Match precedence over If-None-Match mismatches

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:18:33 +00:00
1 parent 926d1a03a9
commit fea6876a46
1 file changed
+11
+11
View File
@@ -430,6 +430,17 @@ async function main() {
`Smoke test failed: expected If-Match + If-None-Match status 304, received ${ifMatchWithNoneMatchAsset.status}.`,
);
}
const ifMatchMismatchWithNoneMatchAsset = await fetch(assetUrl, {
headers: {
"If-Match": "\"definitely-different-etag\"",
"If-None-Match": assetEtag,
},
});
if (ifMatchMismatchWithNoneMatchAsset.status !== 412) {
throw new Error(
`Smoke test failed: expected mismatched If-Match + If-None-Match status 412, received ${ifMatchMismatchWithNoneMatchAsset.status}.`,
);
}
const ifMatchWildcardRangedAsset = await fetch(assetUrl, {
headers: {
Range: "bytes=0-15",