mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add support for CURLINFO_CONN_ID in curl_getinfo() (#18984)
This patch adds support for the CURLINFO_CONN_ID constant in the curl_getinfo() function when compiled with libcurl >= 8.2.0. CURLINFO_CONN_ID allows retrieving the unique identifier of the underlying connection used in the most recent transfer. This is useful for advanced features like connection reuse tracking, diagnostics, or connection pooling implementations at the PHP level.
This commit is contained in:
parent
2ecafd41ba
commit
e84320ad75
5 changed files with 168 additions and 1 deletions
|
@ -2622,6 +2622,11 @@ PHP_FUNCTION(curl_getinfo)
|
|||
if (curl_easy_getinfo(ch->cp, CURLINFO_PROXYAUTH_USED, &l_code) == CURLE_OK) {
|
||||
CAAL("proxyauth_used", l_code);
|
||||
}
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x080200 /* Available since 8.2.0 */
|
||||
if (curl_easy_getinfo(ch->cp, CURLINFO_CONN_ID , &co) == CURLE_OK) {
|
||||
CAAL("conn_id", co);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
switch (option) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue