[Webkit-unassigned] [Bug 220118] Web Inspector: Copy cookie as Netscape HTTP Cookie File format
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 23 07:37:43 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=220118
--- Comment #1 from Ryan Govostes <rgovostes+wk at gmail.com> ---
Probably a bad attempt at a function to convert the tabular format that gets copied now to the cookies.txt format. Assumes the column visibility and ordering settings (which I think are default).
(function (cookies) {
return "# Netscape HTTP Cookie File\n" + cookies.split("\n").map( (cookie) => {
let [name, value, domain, path, expires, size, secure, httponly, samesite] = cookie.split("\t")
expires = Date.parse(expires) / 1000
return domain + "\t" + (!!samesite ? "FALSE" : "TRUE") + "\t" + path + "\t" + (!!secure ? "FALSE" : "TRUE") + "\t" + expires + "\t" + name + "\t" + value
}).join("\n")
})(the_cookies)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201223/f3868259/attachment-0001.htm>
More information about the webkit-unassigned
mailing list