mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:23:33 +03:00
cookie: cap expire times to 400 days
The pending cookie RFC update (currently known as 6265bis draft-19) says Let cookie-age-limit be the maximum age of the cookie (which name of Max-Age and an attribute-value of expiry-time. SHOULD be 400 days or less. This change makes received cookies over the wire get capped to 400 days. It does not cap the expiry date of cookies loaded from file. It does this by rounding the expire time to a even minute. This, to allow the test suite to do the same and have a chance to get the same number for stable testing without requiring a debug build. The test script generates TWO numbers in the output file for each %days[] used in the input test file, and the function that subsequently compares and verifies output is fine with *either* of the two numbers. This is done so that if the test case is generated the second immediately before curl runs, that updated expiry number is also deemed okay. It still checks for an exact match of either number. Closes #15937
This commit is contained in:
parent
533dc84e6e
commit
386f570df6
10 changed files with 103 additions and 46 deletions
|
|
@ -78,15 +78,9 @@ Proxy-Connection: Keep-Alive
|
|||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
%if large-time
|
||||
.example.com TRUE / FALSE 17545593600 test7value test7
|
||||
.example.com TRUE / FALSE 17545593600 test4value test4
|
||||
.example.com TRUE / FALSE 17545593600 test2value test2
|
||||
%else
|
||||
.example.com TRUE / FALSE 2145830400 test7value test7
|
||||
.example.com TRUE / FALSE 2145830400 test4value test4
|
||||
.example.com TRUE / FALSE 2145830400 test2value test2
|
||||
%endif
|
||||
.example.com TRUE / FALSE %days[400] test7value test7
|
||||
.example.com TRUE / FALSE %days[400] test4value test4
|
||||
.example.com TRUE / FALSE %days[400] test2value test2
|
||||
.example.com TRUE / FALSE 0 test1value test1
|
||||
</file>
|
||||
</verify>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue