df2dd8
From df574e2999dc6c2c38138bd0c3ec61dfafe9c929 Mon Sep 17 00:00:00 2001
df2dd8
From: Kornel <kornel@geekhood.net>
df2dd8
Date: Fri, 27 Jan 2023 01:20:38 +0000
df2dd8
Subject: [PATCH] deps(http-cache-semantics): Don't use regex to trim
df2dd8
 whitespace
df2dd8
df2dd8
Signed-off-by: rpm-build <rpm-build>
df2dd8
---
df2dd8
 deps/npm/node_modules/http-cache-semantics/index.js     | 6 +++---
df2dd8
 deps/npm/node_modules/http-cache-semantics/package.json | 2 +-
df2dd8
 2 files changed, 4 insertions(+), 4 deletions(-)
df2dd8
df2dd8
diff --git a/deps/npm/node_modules/http-cache-semantics/index.js b/deps/npm/node_modules/http-cache-semantics/index.js
df2dd8
index 4f6c2f3..39d58a7 100644
df2dd8
--- a/deps/npm/node_modules/http-cache-semantics/index.js
df2dd8
+++ b/deps/npm/node_modules/http-cache-semantics/index.js
df2dd8
@@ -79,10 +79,10 @@ function parseCacheControl(header) {
df2dd8
 
df2dd8
     // 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),
df2dd8
     // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale
df2dd8
-    const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing
df2dd8
+    const parts = header.trim().split(/,/);
df2dd8
     for (const part of parts) {
df2dd8
-        const [k, v] = part.split(/\s*=\s*/, 2);
df2dd8
-        cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
df2dd8
+        const [k, v] = part.split(/=/, 2);
df2dd8
+        cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, '');
df2dd8
     }
df2dd8
 
df2dd8
     return cc;
df2dd8
diff --git a/deps/npm/node_modules/http-cache-semantics/package.json b/deps/npm/node_modules/http-cache-semantics/package.json
df2dd8
index 897798d..79c020a 100644
df2dd8
--- a/deps/npm/node_modules/http-cache-semantics/package.json
df2dd8
+++ b/deps/npm/node_modules/http-cache-semantics/package.json
df2dd8
@@ -1,6 +1,6 @@
df2dd8
 {
df2dd8
     "name": "http-cache-semantics",
df2dd8
-    "version": "4.1.0",
df2dd8
+    "version": "4.1.1",
df2dd8
     "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
df2dd8
     "repository": "https://github.com/kornelski/http-cache-semantics.git",
df2dd8
     "main": "index.js",
df2dd8
-- 
df2dd8
2.39.2
df2dd8