[php-src] PR #18678: Add `SAPI_HEADER_REMOVE_PREFIX`, make ext/session use it

From: Date: Tue, 27 May 2025 20:27:29 +0000
Subject: [php-src] PR #18678: Add `SAPI_HEADER_REMOVE_PREFIX`, make ext/session use it
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-31835@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/18678 Author: NattyNarwhal Refactoring this as part of triaging GH-18601 - I don't think it'll fix the issue, but it's a good idea to clean anyways. ext/session had its own copy of the remove header code, because the SAPI header op mandated it was just a name, and would remove all headers for that name. ext/session couldn't rely on this because it only wanted to remove a specific cookie, not all of them. To simplify this, add a version of SAPI_HEADER_REMOVE that is more flexible and allows for passing a prefix to check for, not just a name. This should work for removing a specific cookie from the headers. (Also fixes some whitespace too.)

« previous php.git-pulls (#31835) next »