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