Open Austinb opened 4 years ago
I think that is done in the following lines (specifically 236): https://github.com/N0taN3rd/node-warc/blob/be3897198847fa49023ca4d09f09c0010dd98540/lib/warcRecord/warcContentParsers.js#L220-L252
Maybe you could fix it and do a PR for it to get fixed.
Where there are multiple
Set-Cookie
headers in a server response from a WARC record the value ofhttpHeaders.Set-Cookie
is always the last one in the list. This should be returned as an array of theSet-Cookie
headers if that change doesnt break other things or there should be another method to get all of the cookies from the headers block. Another option would be to keep the line endings (\n) for the response so it is still a string but you can split it if you want.Example WARC record (minus the content block):
Response from
console.log(record.httpHeaders);
when used in therecord
callback: