Assert current If-Unmodified-Since with If-None-Match
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
741c02eaba
commit
78eea79845
1 file changed
+11
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user