I am working on some browser-like cookie handling in Node.JS and want to know how far to expand on this code from NodeJS and HTTP Client - Are cookies supported?
The code drops everything after the first semicolon.
var cookie = get(response.headers, "Set-Cookie")
if (cookie) {
cookie = (cookie + "").split(";").shift()
set(opts.headers, "Cookie", cookie)
}
I will expand on that in limited ways and am looking at how to avoid a re-write for future steps.
I have seen multiple cookies being set using multiple Set-Cookie headers.