Tuesday 25 February 2020

Any Node.js package that can parse a cookie that have multiple values on the same name?

Looks like the 3 top cookie libraries are not able to parse cookie that have duplicate namescookie https://github.com/jshttp/cookie/issues/60cookies https://github.com/pillarjs/cookies/issues/88tough-cookie https://github.com/salesforce/tough-cookie/issues/88How are you dealing with cookies having multiple identical names? E.g. when identical cookies are set from different domains.Note that this behaviour is specified by RFC 2616Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

Submitted February 25, 2020 at 10:44AM by yvele

No comments:

Post a Comment