diff --git a/cake/libs/cake_response.php b/cake/libs/cake_response.php index 60259f3be..d2217efbd 100644 --- a/cake/libs/cake_response.php +++ b/cake/libs/cake_response.php @@ -614,7 +614,8 @@ class CakeResponse { $time = strtotime($time); } $this->header(array( - 'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', + 'Date' => gmdate("D, j M Y G:i:s ", time()) . 'GMT', + 'Last-Modified' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', 'Expires' => gmdate("D, j M Y H:i:s", $time) . " GMT", 'Cache-Control' => 'public, max-age=' . ($time - time()), 'Pragma' => 'cache' diff --git a/cake/tests/cases/libs/cake_response.test.php b/cake/tests/cases/libs/cake_response.test.php index d2e446507..eee0cfc69 100644 --- a/cake/tests/cases/libs/cake_response.test.php +++ b/cake/tests/cases/libs/cake_response.test.php @@ -230,6 +230,7 @@ class CakeResponseTestCase extends CakeTestCase { $time = '+1 day'; $expected = array( 'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', + 'Last-Modified' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', 'Expires' => gmdate("D, j M Y H:i:s", strtotime($time)) . " GMT", 'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()), 'Pragma' => 'cache' @@ -242,6 +243,7 @@ class CakeResponseTestCase extends CakeTestCase { $time = '+5 day'; $expected = array( 'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', + 'Last-Modified' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', 'Expires' => gmdate("D, j M Y H:i:s", strtotime($time)) . " GMT", 'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()), 'Pragma' => 'cache' @@ -254,6 +256,7 @@ class CakeResponseTestCase extends CakeTestCase { $time = time(); $expected = array( 'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', + 'Last-Modified' => gmdate("D, j M Y G:i:s ", $since) . 'GMT', 'Expires' => gmdate("D, j M Y H:i:s", $time) . " GMT", 'Cache-Control' => 'public, max-age=0', 'Pragma' => 'cache'