Fixed bug #61605 header_remove() does not remove all headers#36
Closed
reeze wants to merge 1 commit intophp:PHP-5.3from
Closed
Fixed bug #61605 header_remove() does not remove all headers#36reeze wants to merge 1 commit intophp:PHP-5.3from
reeze wants to merge 1 commit intophp:PHP-5.3from
Conversation
Contributor
Author
There was a problem hiding this comment.
zend_llist doesn't have any api to remove more than one element like HashTable's apply. so I simply do it my self (original macro DEL_LLIST_ELEMENT(current, l)). if there is a easy way please tell me.thanks.
|
Comment on behalf of laruence at php.net: thanks for your work, but I got a fix and phpt test. and it also seems better. |
|
Comment on behalf of laruence at php.net: close request |
Contributor
Author
|
thanks. but I think we choose the same way. |
Member
|
Nope, for header_remove, it's no need to call strlen, it already there, and also the php test script, and the pdtor ,,,etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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