From cc104c0b023a3dd7cc6eac8d5b29bb3f546c4783 Mon Sep 17 00:00:00 2001 From: maxcoulombe Date: Mon, 27 Feb 2023 17:18:15 -0500 Subject: [PATCH] * built change --- dist/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9af4054..5886c40 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6363,6 +6363,7 @@ const statusCodeCacheableByDefault = new Set([ 206, 300, 301, + 308, 404, 405, 410, @@ -6435,10 +6436,10 @@ function parseCacheControl(header) { // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing + const parts = header.trim().split(/,/); for (const part of parts) { - const [k, v] = part.split(/\s*=\s*/, 2); - cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting + const [k, v] = part.split(/=/, 2); + cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); } return cc;