Re: [PATCH] Allow unsetting headers previously set using header()
| From: | Johannes Schlüter | Date: | Wed, 22 Oct 2008 11:40:40 +0000 |
| Subject: | Re: [PATCH] Allow unsetting headers previously set using header() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41318@lists.php.net to get a copy of this message | ||
Hi,
On Mon, 2008-10-20 at 09:12 +0200, Hannes Magnusson wrote:
> > I suggest extending the behaviour of header() so that when the first
> > argument does not contain a colon (and does not begin with "HTTP/"), e.g.
> > header('Vary'), it unsets the header with the specified name. I decided to
> > extend the existing header() function rather than adding a new function,
> > because the existing function already supports multiple actions (add, append
> > and replace).
>
>
> That isn't very intuitive. I would think it was a typo when reading
> such code and fix the header line...
> I'd suggest explicit header_remove("Vary");
Agreed, a specific function with a clear name sounds better.
Christian, can you update the patch? - thanks!
johannes