From 933cc420544a52c0c4021c2b822c138e742f0eed Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:44:00 +0000 Subject: [PATCH] Assert ranged If-Unmodified-Since and If-None-Match behavior Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index e92fdba1a3..95757b39cf 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -564,6 +564,18 @@ async function main() { `Smoke test failed: expected current If-Unmodified-Since + If-None-Match status 304, received ${ifUnmodifiedSinceCurrentWithNoneMatch.status}.`, ); } + const ifUnmodifiedSinceCurrentWithNoneMatchRange = await fetch(assetUrl, { + headers: { + Range: "bytes=0-15", + "If-Unmodified-Since": assetLastModified, + "If-None-Match": assetEtag, + }, + }); + if (ifUnmodifiedSinceCurrentWithNoneMatchRange.status !== 304) { + throw new Error( + `Smoke test failed: expected ranged current If-Unmodified-Since + If-None-Match status 304, received ${ifUnmodifiedSinceCurrentWithNoneMatchRange.status}.`, + ); + } const ifMatchPrecedenceAsset = await fetch(assetUrl, { headers: { "If-Match": assetEtag,