Assert ranged If-Unmodified-Since and If-None-Match behavior
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
78eea79845
commit
933cc42054
1 file changed
+12
@@ -564,6 +564,18 @@ async function main() {
|
||||
`Smoke test failed: expected current If-Unmodified-Since + If-None-Match status 304, received ${ifUnmodifiedSinceCurrentWithNoneMatch.status}.`,
|
||||
);
|
||||
}
|
||||
const ifUnmodifiedSinceCurrentWithNoneMatchRange = await fetch(assetUrl, {
|
||||
headers: {
|
||||
Range: "bytes=0-15",
|
||||
"If-Unmodified-Since": assetLastModified,
|
||||
"If-None-Match": assetEtag,
|
||||
},
|
||||
});
|
||||
if (ifUnmodifiedSinceCurrentWithNoneMatchRange.status !== 304) {
|
||||
throw new Error(
|
||||
`Smoke test failed: expected ranged current If-Unmodified-Since + If-None-Match status 304, received ${ifUnmodifiedSinceCurrentWithNoneMatchRange.status}.`,
|
||||
);
|
||||
}
|
||||
const ifMatchPrecedenceAsset = await fetch(assetUrl, {
|
||||
headers: {
|
||||
"If-Match": assetEtag,
|
||||
|
||||
Reference in new issue
Block a user