Assert HEAD wildcard If-Match and If-None-Match behavior
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
965a21f973
commit
6b20a47021
1 file changed
+12
@@ -441,6 +441,18 @@ async function main() {
|
||||
`Smoke test failed: expected wildcard If-Match + If-None-Match status 304, received ${ifMatchWildcardWithNoneMatchAsset.status}.`,
|
||||
);
|
||||
}
|
||||
const ifMatchWildcardWithNoneMatchHeadAsset = await fetch(assetUrl, {
|
||||
method: "HEAD",
|
||||
headers: {
|
||||
"If-Match": "*",
|
||||
"If-None-Match": assetEtag,
|
||||
},
|
||||
});
|
||||
if (ifMatchWildcardWithNoneMatchHeadAsset.status !== 304) {
|
||||
throw new Error(
|
||||
`Smoke test failed: expected HEAD wildcard If-Match + If-None-Match status 304, received ${ifMatchWildcardWithNoneMatchHeadAsset.status}.`,
|
||||
);
|
||||
}
|
||||
const ifMatchMismatchWithNoneMatchAsset = await fetch(assetUrl, {
|
||||
headers: {
|
||||
"If-Match": "\"definitely-different-etag\"",
|
||||
|
||||
Reference in new issue
Block a user