Assert If-Match precedence over If-Unmodified-Since

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 03:44:05 +00:00
1 parent ffa2756cf6
commit 262d5088f8
1 file changed
+11
+11
View File
@@ -384,6 +384,17 @@ async function main() {
`Smoke test failed: expected current If-Unmodified-Since status 200, received ${ifUnmodifiedSinceCurrentAsset.status}.`,
);
}
const ifMatchPrecedenceAsset = await fetch(assetUrl, {
headers: {
"If-Match": assetEtag,
"If-Unmodified-Since": staleUnmodifiedSince,
},
});
if (ifMatchPrecedenceAsset.status !== 200) {
throw new Error(
`Smoke test failed: expected If-Match precedence status 200, received ${ifMatchPrecedenceAsset.status}.`,
);
}
const conditionalHeadAsset = await fetch(assetUrl, {
method: "HEAD",
headers: {