php/php-src — pull request #36 by reeze (2012-04-03 17:40:00+00:00)
Title: Fixed bug #61605 header_remove() does not remove all headers

Hi,
after looking at the code,I found that SAPI it self did't handle multiple headers properly, apache2handler handles it for itself. so apache2handler can remove it correctly.

SAPI headers are saved in zend_llist. when try to remove or replace it simply try to find the first one it found and stop searching. I've looked at sapi/cli&cgi they both didn't handle it itself.
Sine header() doc says: "The optional replace parameter indicates whether the header should replace a previous similar header". but it did't behavior like this.
So I made a patch for this. can someone review this pull request for me?

Thanks