0
0
Fork 0
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:
Agustin Casagrande 2022-09-29 02:04:45 -03:00 committed by GitHub
parent 691e36ac50
commit 16bc9b16d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 '*'");
}
}