Req #49725 [Opn->Bgs]: session: Cache-Control header should not have post-check, pre-check
| From: | jani@php.net | Date: | Wed, 24 Nov 2010 09:55:22 +0000 |
| Subject: | Req #49725 [Opn->Bgs]: session: Cache-Control header should not have post-check, pre-check | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156362@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49725&edit=1
ID: 49725
Updated by: jani@php.net
Reported by: sec dot wb at heysoft dot de
Summary: session: Cache-Control header should not have
post-check, pre-check
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: *
PHP Version: 5.2.11
Block user comment: N
Private report: N
New Comment:
You can disable it with session_cache_limiter( FALSE );
Previous Comments:
------------------------------------------------------------------------
[2009-09-30 18:31:45] sec dot wb at heysoft dot de
In the description I copied the link twice, wanted to write:
It says: "If both post-check and pre-check are specified and set to 0,
both are entirely ignored"
------------------------------------------------------------------------
[2009-09-30 18:29:49] sec dot wb at heysoft dot de
Description:
------------
function session_start causes php to send the following line:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
This is quite stupid because no browser does care about "post-check=0,
pre-check=0". IE will ignore it, as you can read here:
http://blogs.msdn.com/ieinternals/archive/2009/07/20/Using-post_2D00_check-and-pre_2D00_check-cache-directives.aspx
It says:
"http://blogs.msdn.com/ieinternals/archive/2009/07/20/Using-post_2D00_check-and-pre_2D00_check-cache-directives.aspx"
And apparently there even was a beta version of IE7 which did download
all objects twice when "post-check=0, pre-check=0" was specified.
So, I wonder why it is there in nearly each php page?
Reproduce code:
---------------
<?php
// Start a session
if(!defined('SESSION_STARTED')) {
session_name('a_session_id');
@session_start();
define('SESSION_STARTED', true);
}
?>
Expected result:
----------------
No stupid cache control output
Actual result:
--------------
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49725&edit=1