Removed Max-Age cookie field for now.

This commit is contained in:
flash 2023-01-10 21:50:54 +00:00
parent fbe4fe18de
commit f244121e0b
2 changed files with 3 additions and 8 deletions

View file

@ -1 +1 @@
0.2301.70411
0.2301.102150

View file

@ -1,7 +1,7 @@
<?php
// HttpResponseBuilder.php
// Created: 2022-02-08
// Updated: 2023-01-05
// Updated: 2023-01-10
namespace Index\Http;
@ -61,12 +61,7 @@ class HttpResponseBuilder extends HttpMessageBuilder {
$expires = DateTime::createFromInterface($expires);
}
$now = DateTime::now();
$maxAge = $expires->isLessThanOrEqual($now)
? -1 : $expires->difference($now)->totalSeconds();
$expires = $expires->toCookieString();
$cookie .= '; Expires=' . $expires . '; Max-Age=' . $maxAge;
$cookie .= '; Expires=' . $expires->toCookieString();
}
if(!empty($domain))