#19778 [Opn]: Provide a way to remove http headers - like f.x. header("Pragma:")

From: Date: Mon, 11 Nov 2002 21:02:23 +0000
Subject: #19778 [Opn]: Provide a way to remove http headers - like f.x. header("Pragma:")
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-24622@lists.php.net to get a copy of this message
 ID:               19778
 User updated by:  php@savignano.de
 Reported By:      php@savignano.de
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: any
 PHP Version:      4.2.1
 New Comment:

If you can <i>modify</i> headers using the header() function, they
can't be sent already, can they?

At least with some types of headers, this works.

So I assume that headers are buffered at least until the document
output has begun.


Previous Comments:
------------------------------------------------------------------------

[2002-11-10 18:41:54] maxim@php.net

Blind shot - this is impossible because headers get sent as soon I they
are encountered and thus you can override them by sending one more yet
cannot remove what you have already sent. I might be wrong, though.

If I'm not then lots close this one. 

------------------------------------------------------------------------

[2002-10-06 08:29:27] php@savignano.de

Sometimes it would be very handy to be able to remove a http header
that has already been set (for example, by the session module). Even
though header() allows me to replace a header, there is no way to
completely remove it.

Proposal: 
header("Pragma:") could be used to remove a Pragma header - i.e. a
header given with no parms would remove the header.

Better:
New function like remove_header()

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19778&edit=1



Thread (6 messages)

« previous php.bugs (#24622) next »