Commit: 9dc78c717c056c84d62a5055221e9a54fd45d0ad

Author: Ali Farhadi | Date: 2010-08-31 02:22:53 +0430
Removing unnecessary Last-Modified header and adding max-age header.
diff --git a/libraries/lithium/action/Response.php b/libraries/lithium/action/Response.php index a7329d2..f83d2ef 100644 --- a/libraries/lithium/action/Response.php +++ b/libraries/lithium/action/Response.php @@ -75,10 +75,10 @@ class Response extends \lithium\net\http\Response { if ($expires === false) { $headers = array( 'Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT', - 'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT', 'Cache-Control' => array( 'no-store, no-cache, must-revalidate', - 'post-check=0, pre-check=0' + 'post-check=0, pre-check=0', + 'max-age=0' ), 'Pragma' => 'no-cache', ); diff --git a/libraries/lithium/tests/cases/action/ResponseTest.php b/libraries/lithium/tests/cases/action/ResponseTest.php index 95d9c73..25e6b98 100644 --- a/libraries/lithium/tests/cases/action/ResponseTest.php +++ b/libraries/lithium/tests/cases/action/ResponseTest.php @@ -85,10 +85,10 @@ class ResponseTest extends \lithium\test\Unit { $headers = array ( 'HTTP/1.1 201 Created', 'Expires: Mon, 26 Jul 1997 05:00:00 GMT', - 'Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT', array( 'Cache-Control: no-store, no-cache, must-revalidate', - 'Cache-Control: post-check=0, pre-check=0' + 'Cache-Control: post-check=0, pre-check=0', + 'Cache-Control: max-age=0' ), 'Pragma: no-cache' );