mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Update
This commit is contained in:
12
server/cookies.ts
Normal file
12
server/cookies.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function parse_cookies(c: string | null) {
|
||||
const m = new Map<string, string>();
|
||||
if (c === null) return m;
|
||||
for (const a of c.split(";")) {
|
||||
const b = a.trim();
|
||||
const d = b.split("=");
|
||||
if (d.length > 1) {
|
||||
m.set(d[0], d.slice(1).join("="));
|
||||
}
|
||||
}
|
||||
return m;
|
||||
}
|
||||
Reference in New Issue
Block a user