php-src/ext
Calvin Buckley 18dee43e02
Add SAPI_HEADER_DELETE_PREFIX, make ext/session use it (#18678)
* Add SAPI_HEADER_DELETE_PREFIX operation

The session ext currently munges into the linked list of headers
itself, because the delete header API is given the key for headers to
delete. The session ext wants to use a prefix past the colon separator,
for i.e. "Set-Cookie: PHPSESSID=", to eliminate only the specific cookie
rather than all cookies.

This changes the SAPI code to add a new header op to take a prefix
instead. Call sites are yet unchanged. Also fix some whitespace.

* Simplify cookie setting code in ext/session

Use the modern SAPI header ops API, including the remove prefix op we
just added.

* [ci skip] Remove redundant and unnecessary comment

The purpose of this is clear, and after refactoring, the special case is
no longer there, so it has no value.

* Un-deprecate simple add/replace header API, use it

Suggestion from Jakub.

* Restore the optimization removing session cookies had

I don't think this needs to be special cased with the parameter.

* Move setting header length to caller

Suggestion from Jakub.

* [ci skip] adjust tab count

It may be better to use spaces in here instead.

* Use session_cookie_len rather than calling strlen
2025-07-31 19:52:04 -03:00
..
bcmath ext/bcmath: use vector in compare (#18859) 2025-06-21 01:34:42 +09:00
bz2 ext/bz2: Remove bool type coercions in tests 2025-06-21 22:19:19 +02:00
calendar ext/calendar: Remove ZPP test 2025-06-23 13:58:19 +02:00
com_dotnet RFC: Clone with v2 (#18747) 2025-07-17 21:13:42 +02:00
ctype Add macos 15 to push GH action (GH-18514) 2025-07-24 15:02:06 +02:00
curl ext/curl: Add CURLOPT_SSL_SIGNATURE_ALGORITHMS option 2025-07-26 20:17:05 +02:00
date Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
dba Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667) 2025-06-22 14:35:28 -07:00
dl_test Merge branch 'PHP-8.4' 2025-03-14 10:51:50 +01:00
dom Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
enchant Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
exif ext/exif: Remove bool type coercions in tests 2025-06-21 22:19:28 +02:00
ffi Use win32 glob implementation on all platforms (#18164) 2025-05-20 16:20:59 -03:00
fileinfo Deduplicate error-handling code in finfo_open (#19149) 2025-07-17 20:45:09 +02:00
filter Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
ftp Merge branch 'PHP-8.4' 2025-07-25 12:05:17 +02:00
gd Merge branch 'PHP-8.4' 2025-07-28 11:55:43 +01:00
gettext ext/gettext: fixed typo in config.m4 (#18790) 2025-06-07 07:31:51 +01:00
gmp ext/gmp: Remove bool type coercions in tests 2025-06-21 22:19:37 +02:00
hash Merge branch 'PHP-8.2' into PHP-8.3 2025-07-22 15:52:29 +02:00
iconv Merge branch 'PHP-8.4' 2025-06-18 20:47:40 +02:00
intl Fix #19307: PGO builds of shared ext-intl are broken 2025-07-30 18:33:40 +02:00
json Merge branch 'PHP-8.4' 2025-03-08 12:27:56 +01:00
ldap Merge branch 'PHP-8.4' 2025-07-17 13:45:32 +02:00
lexbor Cherry pick some recent lexbor changes 2025-07-15 22:28:16 +02:00
libxml Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
mbstring Fix unterminated string GCC warnings in mbstring (#19192) 2025-07-23 11:49:16 +02:00
mysqli Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
mysqlnd Use <winsock2.h> instead of legacy <winsock.h> (#19037) 2025-07-07 09:40:03 +02:00
odbc Arginfo: add and use known strings for attribute values 2025-07-14 17:31:22 -07:00
opcache Refactor op array loops in JIT (#19335) 2025-07-31 22:10:06 +02:00
openssl main: pack _php_netstream_data_t and use bool instead of int type (#19331) 2025-07-31 19:56:38 +01:00
pcntl Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
pcre Add HAVE_MEMMOVE to ext/pcre (#18862) 2025-06-19 21:49:36 +02:00
pdo Use cheaper functions to get member name in PDO (#18769) 2025-06-05 17:46:56 +02:00
pdo_dblib pdo_dblib: Use stack local array instead of heap allocation (#18801) 2025-06-09 11:13:46 +02:00
pdo_firebird Merge branch 'PHP-8.4' 2025-04-19 14:11:35 +09:00
pdo_mysql Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667) 2025-06-22 14:35:28 -07:00
pdo_odbc pdo_odbc: Don't fetch 256 byte blocks for long columns (#10809) 2025-07-10 13:03:11 -03:00
pdo_pgsql Merge branch 'PHP-8.4' 2025-07-27 12:56:05 +01:00
pdo_sqlite Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667) 2025-06-22 14:35:28 -07:00
pgsql Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
phar Merge branch 'PHP-8.4' 2025-07-07 16:28:58 +02:00
posix ext/posix: value ranges check for posix_setrlimit and posix_setpgid 2025-07-29 13:10:26 +01:00
random Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
readline Fix bug #51558: shared readline build fails (#15242) 2025-07-27 15:33:48 +02:00
reflection Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
session Add SAPI_HEADER_DELETE_PREFIX, make ext/session use it (#18678) 2025-07-31 19:52:04 -03:00
shmop Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
simplexml ext/simplexml: Remove bool type coercions in tests 2025-06-23 14:57:05 +02:00
skeleton
snmp ext/snmp: no need to use a smart_string for error message (#19171) 2025-07-18 16:43:39 +01:00
soap Fix GH-19226: Segfault when spawning new thread in soap extension 2025-07-24 11:56:43 +02:00
sockets ext/sockets: using accept4 wheneever possible for php_accept_connect helper (#19268) 2025-07-27 20:52:11 +01:00
sodium Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667) 2025-06-22 14:35:28 -07:00
spl Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
sqlite3 ext/sqlite3: relax sqlite3 explain test conditions (#18949) 2025-06-29 13:58:58 +01:00
standard ext/standard/proc_open.c: Minor refactorings (#18085) 2025-07-31 23:02:35 +01:00
sysvmsg ext/sysvmsg: various minor refactorings 2025-07-28 15:33:22 +01:00
sysvsem ext/sysvsem: use bool type instead of int 2025-07-28 15:33:22 +01:00
sysvshm Fix exception handling in shm_put_var() (#19279) 2025-07-29 17:31:06 +02:00
tidy ext/tidy: refactor php_tidy_file_to_mem() 2025-07-18 13:21:56 +01:00
tokenizer RFC: Pipe operator (#17118) 2025-06-10 09:59:43 +02:00
uri uri: Improve exceptions for Uri\Rfc3986\Uri (#19161) 2025-07-18 17:38:44 +02:00
xml Arginfo: avoid using temporary zvals for initializing attribute values (#19141) 2025-07-21 13:33:51 -07:00
xmlreader Merge branch 'PHP-8.4' 2025-07-20 17:20:53 +02:00
xmlwriter ext/standard/file: clarify fclose() warning 2025-03-24 22:54:34 +00:00
xsl Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667) 2025-06-22 14:35:28 -07:00
zend_test ext/zend_test: Test zend_call_method_if_exists() 2025-07-30 12:02:41 +01:00
zip Arginfo: reuse zend_string objects for initializing attribute values (#19241) 2025-07-27 17:27:22 -07:00
zlib ext/zlib: Refactor tests (#18887) 2025-06-21 18:03:50 +01:00
ext_skel.php