mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02:00
36d46a4732
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.
21 lines
561 B
PHP
21 lines
561 B
PHP
--TEST--
|
|
Test curl_getinfo() function with CURLINFO_COOKIELIST parameter
|
|
--EXTENSIONS--
|
|
curl
|
|
--FILE--
|
|
<?php
|
|
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
|
|
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
|
|
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(2) {
|
|
[0]=>
|
|
string(38) ".php.net TRUE / FALSE %d C1 v1"
|
|
[1]=>
|
|
string(38) ".php.net TRUE / FALSE %d C2 v2"
|
|
}
|