#40390 [Opn->Bgs]: Documentation is not clear on header() behaviour

From: Date: Fri, 23 Mar 2007 17:32:03 +0000
Subject: #40390 [Opn->Bgs]: Documentation is not clear on header() behaviour
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969375869@lists.php.net to get a copy of this message
ID: 40390 Updated by: vrana@php.net Reported By: razvan dot pop at micronets dot ro -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: It doesn't prevent the headers to be sent, it just send them empty. Previous Comments: ------------------------------------------------------------------------ [2007-02-07 16:40:34] razvan dot pop at micronets dot ro Description: ------------ The documentation page for the header() function (http://www.php.net/manual/en/function.header.php) doesn't officialy state that setting headers in this manner: header('Cache-Control:'); header('Pragma:'); will prevent those headers from being sent even if previously set. Ie. it will efectively delete the headers. Reproduce code: --------------- <?php session_cache_limiter('nocache'); session_start(); header('Cache-Control: max-age=10000'); header('Pragma:'); // deletes "Pragma: no-cache" set by // session_cache_limiter header('Expires:'); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40390&edit=1

« previous php.doc (#969375869) next »