Assert current If-Unmodified-Since with If-None-Match

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:42:56 +00:00
1 parent 741c02eaba
commit 78eea79845
1 file changed
+11
+11
View File
@@ -553,6 +553,17 @@ async function main() {
`Smoke test failed: expected current If-Unmodified-Since status 200, received ${ifUnmodifiedSinceCurrentAsset.status}.`,
);
}
const ifUnmodifiedSinceCurrentWithNoneMatch = await fetch(assetUrl, {
headers: {
"If-Unmodified-Since": assetLastModified,
"If-None-Match": assetEtag,
},
});
if (ifUnmodifiedSinceCurrentWithNoneMatch.status !== 304) {
throw new Error(
`Smoke test failed: expected current If-Unmodified-Since + If-None-Match status 304, received ${ifUnmodifiedSinceCurrentWithNoneMatch.status}.`,
);
}
const ifMatchPrecedenceAsset = await fetch(assetUrl, {
headers: {
"If-Match": assetEtag,