Assert If-Match precedence over If-None-Match mismatches
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
926d1a03a9
commit
fea6876a46
1 file changed
+11
@@ -430,6 +430,17 @@ async function main() {
|
||||
`Smoke test failed: expected If-Match + If-None-Match status 304, received ${ifMatchWithNoneMatchAsset.status}.`,
|
||||
);
|
||||
}
|
||||
const ifMatchMismatchWithNoneMatchAsset = await fetch(assetUrl, {
|
||||
headers: {
|
||||
"If-Match": "\"definitely-different-etag\"",
|
||||
"If-None-Match": assetEtag,
|
||||
},
|
||||
});
|
||||
if (ifMatchMismatchWithNoneMatchAsset.status !== 412) {
|
||||
throw new Error(
|
||||
`Smoke test failed: expected mismatched If-Match + If-None-Match status 412, received ${ifMatchMismatchWithNoneMatchAsset.status}.`,
|
||||
);
|
||||
}
|
||||
const ifMatchWildcardRangedAsset = await fetch(assetUrl, {
|
||||
headers: {
|
||||
Range: "bytes=0-15",
|
||||
|
||||
Reference in new issue
Block a user