We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f70da90 commit b2464a7Copy full SHA for b2464a7
packages/open-next/src/http/util.ts
@@ -41,9 +41,14 @@ export function parseSetCookieHeader(
41
return [];
42
}
43
44
- return typeof cookies === "string"
45
- ? cookies.split(/(?<!Expires=\w+),/i).map((c) => c.trim())
46
- : cookies;
+ if (typeof cookies === "string") {
+ // Split the cookie string on ",".
+ // Note that "," can also appear in the Expires value (i.e. `Expires=Thu, 01 June`)
47
+ // so we have to skip it with a negative lookbehind.
48
+ return cookies.split(/(?<!Expires=\w+),/i).map((c) => c.trim());
49
+ }
50
+
51
+ return cookies;
52
53
54
/**
0 commit comments