Skip to content

Commit 131c2e9

Browse files
committed
GH-15440: adding CURLOPT_TCP_KEEPCNT constant (8.9.0)
close GH-15446
1 parent 8082567 commit 131c2e9

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ PHP NEWS
1414
As such, passing invalid types to exit/die may now result in a TypeError
1515
being thrown. (Girgias)
1616

17+
- CURL:
18+
. Added CURLOPT_TCP_KEEPCNT to set the number of probes to send before
19+
dropping the connection. (David Carlier)
20+
1721
- Hash:
1822
. Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla)
1923

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ PHP 8.4 UPGRADE NOTES
917917
- Curl:
918918
. CURL_HTTP_VERSION_3.
919919
. CURL_HTTP_VERSION_3ONLY.
920+
. CURL_TCP_KEEPCNT
920921

921922
- Intl:
922923
. The IntlDateFormatter class exposes now the new PATTERN constant

ext/curl/curl.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,13 @@
407407
* @cvalue CURLOPT_STDERR
408408
*/
409409
const CURLOPT_STDERR = UNKNOWN;
410+
#if LIBCURL_VERSION_NUM >= 0x080801 /* Available since 8.9.0 */
411+
/**
412+
* @var int
413+
* @cvalue CURLOPT_TCP_KEEPCNT
414+
*/
415+
const CURLOPT_TCP_KEEPCNT = UNKNOWN;
416+
#endif
410417
/**
411418
* @var int
412419
* @cvalue CURLOPT_TELNETOPTIONS

ext/curl/curl_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,9 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
17281728
#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
17291729
case CURLOPT_CA_CACHE_TIMEOUT:
17301730
case CURLOPT_QUICK_EXIT:
1731+
#endif
1732+
#if LIBCURL_VERSION_NUM >= 0x080801 /* Available since 8.9.0 */
1733+
case CURLOPT_TCP_KEEPCNT:
17311734
#endif
17321735
lval = zval_get_long(zvalue);
17331736
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&

0 commit comments

Comments
 (0)