diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index de77008472af..2975e4104c9e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -60,7 +60,8 @@ class NativeSessionStorage implements SessionStorageInterface * ("auto_start", is not supported as it tells PHP to start a session before * PHP starts to execute user-land code. Setting during runtime has no effect). * - * cache_limiter, "" (use "0" to prevent headers from being sent entirely). + * cache_limiter, "private_no_expire" (use "0" to prevent headers from being sent entirely). + * cache_expire, "0" * cookie_domain, "" * cookie_httponly, "" * cookie_lifetime, "0" @@ -101,6 +102,7 @@ public function __construct(array $options = array(), $handler = null, MetadataB { $options += array( 'cache_limiter' => 'private_no_expire', + 'cache_expire' => 0, 'use_cookies' => 1, 'lazy_write' => 1, ); @@ -347,7 +349,7 @@ public function setOptions(array $options) } $validOptions = array_flip(array( - 'cache_limiter', 'cookie_domain', 'cookie_httponly', + 'cache_limiter', 'cache_expire', 'cookie_domain', 'cookie_httponly', 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'entropy_file', 'entropy_length', 'gc_divisor', 'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character', diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected index 5e8deb557c5c..3bc9beeb758f 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/Fixtures/storage.expected @@ -15,6 +15,6 @@ $_SESSION is not empty Array ( [0] => Content-Type: text/plain; charset=utf-8 - [1] => Cache-Control: private, max-age=10800 + [1] => Cache-Control: private, max-age=0 ) shutdown