mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
refactor(ext/cache): remove extra headers iteration in cache.put (#16078)
This commit is contained in:
parent
691e36ac50
commit
16bc9b16d2
1 changed files with 3 additions and 5 deletions
8
ext/cache/01_cache.js
vendored
8
ext/cache/01_cache.js
vendored
|
@ -109,11 +109,9 @@
|
|||
// Step 7.
|
||||
const varyHeader = getHeader(innerResponse.headerList, "vary");
|
||||
if (varyHeader) {
|
||||
const fieldValues = varyHeader.split(",").map((field) => field.trim());
|
||||
for (const fieldValue of fieldValues) {
|
||||
if (
|
||||
fieldValue === "*"
|
||||
) {
|
||||
const fieldValues = varyHeader.split(",");
|
||||
for (const field of fieldValues) {
|
||||
if (field.trim() === "*") {
|
||||
throw new TypeError("Vary header must not contain '*'");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue