]> git.ipfire.org Git - thirdparty/curl.git/commit
cookies: same domain handling changed to match browser behavior
authorSergei Kuzmin <sergeikuzmin@gmail.com>
Mon, 3 Oct 2016 04:34:59 +0000 (21:34 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 3 Oct 2016 14:49:35 +0000 (16:49 +0200)
commit54e48b14e1ecf399149b137bb741cf84a73b1f32
treef16031e237366916571cc986d38025b1b9135902
parent2a1d538963c5861d729eea2b4bb271fad03217d1
cookies: same domain handling changed to match browser behavior

Cokie with the same domain but different tailmatching property are now
considered different and do not replace each other.  If header contains
following lines then two cookies will be set: Set-Cookie: foo=bar;
domain=.foo.com; expires=Thu Mar 3 GMT 8:56:27 2033 Set-Cookie: foo=baz;
domain=foo.com; expires=Thu Mar 3 GMT 8:56:27 2033

This matches Chrome, Opera, Safari, and Firefox behavior. When sending
stored tokens to foo.com Chrome, Opera, Firefox store send them in the
stored order, while Safari pre-sort the cookies.

Closes #1050
lib/cookie.c
tests/data/test506