Re: [PATCH] Allow unsetting headers previously set usingheader()
| From: | Christian Schmidt | Date: | Sun, 09 Nov 2008 18:51:31 +0000 |
| Subject: | Re: [PATCH] Allow unsetting headers previously set usingheader() | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41782@lists.php.net to get a copy of this message | ||
Stan Vassilev | FM wrote:
> I suggest header_remove('*') or simply header_remove() /no param/
> removes all headers (including the one PHP sets by default), so we can
> start with a clear state.
I added header_remove('Foo'). header_remove() without arguments removes
all headers (though Apache still adds some headers that you cannot remove).
I have tested with apache2handler and cgi. I had to change the signature
of SAPI header_handler function and sapi_header_struct, so the other
SAPIs should be updated for this. I am not sure how to test all these?
Creating a testing environment for all those webservers seems like a
huge task.
I am not comfortable with the size of this patch, given my understanding
of the PHP source code and my general C skills, so I am posting this
patch hoping that somebody will pick it up or help me get it into shape.
Christian