mirror of
https://github.com/curl/curl.git
synced 2026-07-16 03:17:15 +03:00
cookies: support creation-time attribute for cookies
According to RFC6265 section 5.4, cookies with equal path lengths SHOULD be sorted by creation-time (earlier first). This adds a creation-time record to the cookie struct in order to make cookie sorting more deterministic. The creation-time is defined as the order of the cookies in the jar, the first cookie read fro the jar being the oldest. The creation-time is thus not serialized into the jar. Also remove the strcmp() matching in the sorting as there is no lexicographic ordering in RFC6265. Existing tests are updated to match. Closes #2524
This commit is contained in:
parent
b842fa3110
commit
e2ef8d6fa1
12 changed files with 120 additions and 82 deletions
|
|
@ -62,7 +62,7 @@ perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs endi
|
|||
GET /we/want/8 HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
Cookie: cookie=perhaps; name with space=is weird but; trailingspace=removed; cookie=yes; foobar=name; blexp=yesyes
|
||||
Cookie: name with space=is weird but; trailingspace=removed; cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue