Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: http-cache-semantics@4.1.1 #6115

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions node_modules/http-cache-semantics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const statusCodeCacheableByDefault = new Set([
206,
300,
301,
308,
404,
405,
410,
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 2 additions & 8 deletions node_modules/http-cache-semantics/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -13,12 +13,6 @@
"author": "Kornel Lesiński <kornel@geekhood.net> (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"
}
}
7 changes: 4 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down