You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although cookies are serialized linearly in the Cookie header, servers SHOULD NOT rely upon the serialization order. In particular, if the Cookie header contains two cookies with the same name (e.g., that were set with different Path or Domain attributes), servers SHOULD NOT rely upon the order in which these cookies appear in the header.
so this might be a little academic.
The text was updated successfully, but these errors were encountered:
RFC6265 § 5.4 states:
However, Cro::HTTP::Client::CookieJar does not do this:
Note that the order seems to be reverse chronological, rather than the one stated by the spec.
Note also that the cookie jar code does appear to be trying to sort according to the spec:
but this has a couple of problems.
It sorts by path length ascendingly (so longer paths appear later, which is against the spec).
The sort order gets lost anyway, since the sorted list is never used or assigned to anything (so the cookies remain in the order they were added).
This order is later reversed because
$req.add-cookie
doeswhich (for each cookie that gets added) (!)
Cookie
header into Cro::HTTP::Cookie objects (with!unpack-cookie
)Cookie
header string (with!pack-cookie
)A change like the following addresses these issues:
That said, RFC6265 § 4.2.2 also says:
so this might be a little academic.
The text was updated successfully, but these errors were encountered: