mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-10 00:26:55 +00:00
* built change
This commit is contained in:
parent
777e837b03
commit
cc104c0b02
1 changed files with 4 additions and 3 deletions
7
dist/index.js
vendored
7
dist/index.js
vendored
|
|
@ -6363,6 +6363,7 @@ const statusCodeCacheableByDefault = new Set([
|
||||||
206,
|
206,
|
||||||
300,
|
300,
|
||||||
301,
|
301,
|
||||||
|
308,
|
||||||
404,
|
404,
|
||||||
405,
|
405,
|
||||||
410,
|
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),
|
// 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
|
// 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) {
|
for (const part of parts) {
|
||||||
const [k, v] = part.split(/\s*=\s*/, 2);
|
const [k, v] = part.split(/=/, 2);
|
||||||
cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
|
cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
return cc;
|
return cc;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue