Browse Source

Fixed failing test for CakeResponse::sharable + spacing

Costa Caruso 11 years ago
parent
commit
4f559f5cc9

+ 1 - 0
lib/Cake/Network/CakeResponse.php

@@ -838,6 +838,7 @@ class CakeResponse {
 			$this->_cacheDirectives['private'] = true;
 			unset($this->_cacheDirectives['public']);
 		}
+		
 		$this->maxAge($time);
 		if (!$time) {
 			$this->_setCacheControl();

+ 1 - 1
lib/Cake/Test/Case/Network/CakeResponseTest.php

@@ -751,7 +751,7 @@ class CakeResponseTest extends CakeTestCase {
 		$response = new CakeResponse;
 		$response->sharable(true, 3600);
 		$headers = $response->header();
-		$this->assertEquals('public, s-maxage=3600', $headers['Cache-Control']);
+		$this->assertEquals('public, max-age=3600', $headers['Cache-Control']);
 
 		$response = new CakeResponse;
 		$response->sharable(false, 3600);