Skip to content

Commit f71315e

Browse files
committed
ext/curl: Add CURLOPT_SERVER_RESPONSE_TIMEOUT
Adds `CURLOPT_SERVER_RESPONSE_TIMEOUT`, available since Curl 7.20.0. `CURLOPT_SERVER_RESPONSE_TIMEOUT` holds the same value as and it meant to replace `CURLOPT_FTP_RESPONSE_TIMEOUT`. See: - https://curl.se/libcurl/c/CURLOPT_SERVER_RESPONSE_TIMEOUT.html - https://curl.se/libcurl/c/CURLOPT_FTP_RESPONSE_TIMEOUT.html
1 parent 0c0da80 commit f71315e

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ PHP NEWS
88
than fatal error. (ilutov)
99
. Added missing cstddef include for C++ builds. (cmb)
1010

11+
- Curl:
12+
. Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as
13+
CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne)
14+
1115
- BCMath:
1216
. Adjust bcround()'s $mode parameter to only accept the RoundingMode
1317
enum. (timwolla, saki)

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ PHP 8.4 UPGRADE NOTES
228228
. curl_version() returns an additional feature_list value, which is an
229229
associative array of all known Curl features, and whether they are
230230
supported (true) or not (false).
231+
. Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as
232+
CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value.
231233

232234
- Date:
233235
. Added static methods
@@ -789,6 +791,9 @@ PHP 8.4 UPGRADE NOTES
789791
. PHP_OUTPUT_HANDLER_PROCESSED.
790792
. PHP_SBINDIR.
791793

794+
- Curl:
795+
. CURLOPT_SERVER_RESPONSE_TIMEOUT.
796+
792797
- Intl:
793798
. The IntlDateFormatter class exposes now the new PATTERN constant
794799
reflecting udat api's UDAT_PATTERN.

ext/curl/curl.stub.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,9 +1284,15 @@
12841284
const CURLINFO_PROXYAUTH_AVAIL = UNKNOWN;
12851285
/**
12861286
* @var int
1287-
* @cvalue CURLOPT_FTP_RESPONSE_TIMEOUT
1287+
* @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT
1288+
* @alias CURLOPT_SERVER_RESPONSE_TIMEOUT
12881289
*/
12891290
const CURLOPT_FTP_RESPONSE_TIMEOUT = UNKNOWN;
1291+
/**
1292+
* @var int
1293+
* @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT
1294+
*/
1295+
const CURLOPT_SERVER_RESPONSE_TIMEOUT = UNKNOWN;
12901296
/**
12911297
* @var int
12921298
* @cvalue CURLOPT_IPRESOLVE

ext/curl/curl_arginfo.h

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
16271627
case CURLOPT_HTTPAUTH:
16281628
case CURLOPT_FTP_CREATE_MISSING_DIRS:
16291629
case CURLOPT_PROXYAUTH:
1630-
case CURLOPT_FTP_RESPONSE_TIMEOUT:
1630+
case CURLOPT_SERVER_RESPONSE_TIMEOUT:
16311631
case CURLOPT_IPRESOLVE:
16321632
case CURLOPT_MAXFILESIZE:
16331633
case CURLOPT_TCP_NODELAY:

0 commit comments

Comments
 (0)