Skip to content

GH-15440: adding CURLOPT_TCP_KEEPCNT constant (8.9.0) #15446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ PHP NEWS
As such, passing invalid types to exit/die may now result in a TypeError
being thrown. (Girgias)

- CURL:
. Added CURLOPT_TCP_KEEPCNT to set the number of probes to send before
dropping the connection. (David Carlier)

- Hash:
. Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla)

Expand Down
1 change: 1 addition & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ PHP 8.4 UPGRADE NOTES
- Curl:
. CURL_HTTP_VERSION_3.
. CURL_HTTP_VERSION_3ONLY.
. CURL_TCP_KEEPCNT

- Intl:
. The IntlDateFormatter class exposes now the new PATTERN constant
Expand Down
7 changes: 7 additions & 0 deletions ext/curl/curl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@
* @cvalue CURLOPT_STDERR
*/
const CURLOPT_STDERR = UNKNOWN;
#if LIBCURL_VERSION_NUM >= 0x080900 /* Available since 8.9.0 */
/**
* @var int
* @cvalue CURLOPT_TCP_KEEPCNT
*/
const CURLOPT_TCP_KEEPCNT = UNKNOWN;
#endif
/**
* @var int
* @cvalue CURLOPT_TELNETOPTIONS
Expand Down
5 changes: 4 additions & 1 deletion ext/curl/curl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,9 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
case CURLOPT_CA_CACHE_TIMEOUT:
case CURLOPT_QUICK_EXIT:
#endif
#if LIBCURL_VERSION_NUM >= 0x080900 /* Available since 8.9.0 */
case CURLOPT_TCP_KEEPCNT:
#endif
lval = zval_get_long(zvalue);
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
Expand Down
Loading