1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix curl_basic_022.phpt for libcurl 8.12.0

Due to a deliberate change in libcurl, the expiration is now capped to
at most 400 days.  We could solve this by choosing another date roughly
a year in the future, but would need to update the test next year.
This would be especially annoying for security branches.

Another option would be to actually parse the cookie list lines, but
that might not be worth the trouble.  Instead we just ignore the exact
timestamp created by libcurl.

[1] <https://github.com/curl/curl/pull/15937>

Closes GH-17709.
This commit is contained in:
Christoph M. Becker
2025-02-05 15:58:25 +01:00
parent d8aedb589c
commit 36d46a4732

View File

@@ -11,10 +11,10 @@ curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-203
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
?>
--EXPECT--
--EXPECTF--
array(2) {
[0]=>
string(38) ".php.net TRUE / FALSE 2145916799 C1 v1"
string(38) ".php.net TRUE / FALSE %d C1 v1"
[1]=>
string(38) ".php.net TRUE / FALSE 2145916799 C2 v2"
string(38) ".php.net TRUE / FALSE %d C2 v2"
}