diff --git a/src/Control/Middleware/HTTPCacheControlMiddleware.php b/src/Control/Middleware/HTTPCacheControlMiddleware.php index 54adc19f6..8c5cd88a8 100644 --- a/src/Control/Middleware/HTTPCacheControlMiddleware.php +++ b/src/Control/Middleware/HTTPCacheControlMiddleware.php @@ -92,7 +92,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable * * @var string */ - protected $state = self::STATE_ENABLED; + protected $state = self::STATE_DISABLED; /** * Forcing level of previous setting; higher number wins diff --git a/tests/php/Control/HTTPCacheControlIntegrationTest.php b/tests/php/Control/HTTPCacheControlIntegrationTest.php index e443aa1ec..29af2024e 100644 --- a/tests/php/Control/HTTPCacheControlIntegrationTest.php +++ b/tests/php/Control/HTTPCacheControlIntegrationTest.php @@ -4,7 +4,6 @@ namespace SilverStripe\Control\Tests; use SilverStripe\Control\HTTP; use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware; -use SilverStripe\Control\Session; use SilverStripe\Control\Tests\HTTPCacheControlIntegrationTest\RuleController; use SilverStripe\Control\Tests\HTTPCacheControlIntegrationTest\SessionController; use SilverStripe\Core\Config\Config; diff --git a/tests/php/Control/HTTPTest.php b/tests/php/Control/HTTPTest.php index a99bf6311..7de7966ee 100644 --- a/tests/php/Control/HTTPTest.php +++ b/tests/php/Control/HTTPTest.php @@ -75,7 +75,7 @@ class HTTPTest extends FunctionalTest $this->expectException(PHPUnit_Framework_Error_Warning::class); $this->expectExceptionMessage( 'Cache-Control header has already been set. ' - . 'Please use HTTPCacheControl API to set caching options instead.' + . 'Please use HTTPCacheControlMiddleware API to set caching options instead.' ); HTTP::add_cache_headers($response);