Fix action deprecation warnings (#502)

Co-authored-by: David Finol <davidmfinol@gmail.com>
This commit is contained in:
AndrewKahr
2023-02-10 06:43:05 -08:00
committed by GitHub
parent f35829a9d4
commit 8c9dcf076d
8 changed files with 21 additions and 20 deletions

7
dist/index.js generated vendored
View File

@@ -190705,6 +190705,7 @@ const statusCodeCacheableByDefault = new Set([
206,
300,
301,
308,
404,
405,
410,
@@ -190777,10 +190778,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;