From 82ee14bc7e69cc70b062f0f603cb129cb7a4c272 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 03:51:19 +0000 Subject: [PATCH] Assert wildcard If-None-Match and If-Match behavior Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index bd5f29c75e..ce436a5504 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -321,6 +321,16 @@ async function main() { `Smoke test failed: expected weak conditional asset status 304, received ${weakConditionalAsset.status}.`, ); } + const wildcardConditionalAsset = await fetch(assetUrl, { + headers: { + "If-None-Match": "*", + }, + }); + if (wildcardConditionalAsset.status !== 304) { + throw new Error( + `Smoke test failed: expected wildcard conditional asset status 304, received ${wildcardConditionalAsset.status}.`, + ); + } const modifiedSinceAsset = await fetch(assetUrl, { headers: { "If-Modified-Since": assetLastModified, @@ -373,6 +383,16 @@ async function main() { if ((ifMatchMismatchAsset.headers.get("x-content-type-options") ?? "").toLowerCase() !== "nosniff") { throw new Error("Smoke test failed: expected nosniff on If-Match mismatch response."); } + const ifMatchWildcardAsset = await fetch(assetUrl, { + headers: { + "If-Match": "*", + }, + }); + if (ifMatchWildcardAsset.status !== 200) { + throw new Error( + `Smoke test failed: expected wildcard If-Match status 200, received ${ifMatchWildcardAsset.status}.`, + ); + } if (ifMatchMismatchAsset.headers.get("etag") !== assetEtag) { throw new Error("Smoke test failed: expected ETag on If-Match mismatch response."); }