From fea6876a4663a270fff9ad8e7e04d8b14430e28f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:18:33 +0000 Subject: [PATCH] Assert If-Match precedence over If-None-Match mismatches Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 148e9d2acf..ea88348a74 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -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",