Assert wildcard If-Match preserves ranged responses

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:15:48 +00:00
1 parent b36185d40e
commit 95b52ecb47
1 file changed
+11
+11
View File
@@ -419,6 +419,17 @@ async function main() {
`Smoke test failed: expected wildcard If-Match status 200, received ${ifMatchWildcardAsset.status}.`,
);
}
const ifMatchWildcardRangedAsset = await fetch(assetUrl, {
headers: {
Range: "bytes=0-15",
"If-Match": "*",
},
});
if (ifMatchWildcardRangedAsset.status !== 206) {
throw new Error(
`Smoke test failed: expected wildcard If-Match ranged status 206, received ${ifMatchWildcardRangedAsset.status}.`,
);
}
if (ifMatchMismatchAsset.headers.get("etag") !== assetEtag) {
throw new Error("Smoke test failed: expected ETag on If-Match mismatch response.");
}