node_modules: update (#344)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-10 17:27:57 +02:00
1 parent b099186883
commit 6e88c72525
63 files changed
+2863 -1227

No files matched your search

+18 -11
View File
@@ -92,19 +92,31 @@ class Cookies {
*/
parse(cookieStr) {
const cookie = {};
let hasNameValue = false;
(cookieStr || '')
.toString()
.split(';')
.forEach(cookiePart => {
const valueParts = cookiePart.split('=');
const key = valueParts.shift().trim().toLowerCase();
let value = valueParts.join('=').trim();
let domain;
if (!key) {
if (!cookiePart.trim()) {
// skip empty parts
return;
}
switch (key) {
const valueParts = cookiePart.split('=');
const name = valueParts.shift().trim();
let value = valueParts.join('=').trim();
let domain;
// the first part is always the name-value pair, so a cookie named
// like an attribute is not mistaken for one (RFC 6265 section 5.2)
if (!hasNameValue) {
hasNameValue = true;
if (name) {
// cookie names are case-sensitive, only attribute names are not
cookie.name = name;
cookie.value = value;
}
return;
}
switch (name.toLowerCase()) {
case 'expires': {
const expires = new Date(value);
// ignore date if can not parse it
@@ -132,11 +144,6 @@ class Cookies {
case 'httponly':
cookie.httponly = true;
break;
default:
if (!cookie.name) {
cookie.name = key;
cookie.value = value;
}
}
});
return cookie;