From 64b06ed21fc165e413b3e6f1ae5a236350e5bfaf Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 1 Feb 2023 06:56:19 -0800 Subject: [PATCH] deps: http-cache-semantics@4.1.1 --- node_modules/http-cache-semantics/index.js | 7 ++++--- node_modules/http-cache-semantics/package.json | 10 ++-------- package-lock.json | 7 ++++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/node_modules/http-cache-semantics/index.js b/node_modules/http-cache-semantics/index.js index 4f6c2f30498b4..31fba4860024c 100644 --- a/node_modules/http-cache-semantics/index.js +++ b/node_modules/http-cache-semantics/index.js @@ -7,6 +7,7 @@ const statusCodeCacheableByDefault = new Set([ 206, 300, 301, + 308, 404, 405, 410, @@ -79,10 +80,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; diff --git a/node_modules/http-cache-semantics/package.json b/node_modules/http-cache-semantics/package.json index 897798d8ccc79..defbb045a6383 100644 --- a/node_modules/http-cache-semantics/package.json +++ b/node_modules/http-cache-semantics/package.json @@ -1,6 +1,6 @@ { "name": "http-cache-semantics", - "version": "4.1.0", + "version": "4.1.1", "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", "repository": "https://github.com/kornelski/http-cache-semantics.git", "main": "index.js", @@ -13,12 +13,6 @@ "author": "Kornel LesiƄski (https://kornel.ski/)", "license": "BSD-2-Clause", "devDependencies": { - "eslint": "^5.13.0", - "eslint-plugin-prettier": "^3.0.1", - "husky": "^0.14.3", - "lint-staged": "^8.1.3", - "mocha": "^5.1.0", - "prettier": "^1.14.3", - "prettier-eslint-cli": "^4.7.1" + "mocha": "^10.0" } } diff --git a/package-lock.json b/package-lock.json index 237a3af98d7ca..e75716a4f9aed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5783,9 +5783,10 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "inBundle": true, - "license": "BSD-2-Clause" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "inBundle": true }, "node_modules/http-proxy": { "version": "1.18.1",