Skip to content

Commit 700e3ad

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 44ec179 commit 700e3ad

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ PHP NEWS
3838
EAI_SYSTEM not found). (nielsdos)
3939
. Implemented asymmetric visibility for properties. (ilutov)
4040

41+
- Curl:
42+
. Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as
43+
CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne)
44+
4145
- Date:
4246
. Fixed bug GH-13773 (DatePeriod not taking into account microseconds for end
4347
date). (Mark Bennewitz, Derick)

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ PHP 8.4 UPGRADE NOTES
292292
supported (true) or not (false).
293293
. Added CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants (available
294294
since libcurl 7.66 and 7.88) as available options for CURLOPT_HTTP_VERSION.
295+
. Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as
296+
CURLOPT_FTP_RESPONSE_TIMEOUT. Both constants hold the same value.
295297

296298
- Date:
297299
. Added static methods
@@ -996,6 +998,7 @@ PHP 8.4 UPGRADE NOTES
996998
. CURL_HTTP_VERSION_3.
997999
. CURL_HTTP_VERSION_3ONLY.
9981000
. CURL_TCP_KEEPCNT
1001+
. CURLOPT_SERVER_RESPONSE_TIMEOUT.
9991002

10001003
- Intl:
10011004
. The IntlDateFormatter class exposes now the new PATTERN constant

ext/curl/curl.stub.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,9 +1291,15 @@
12911291
const CURLINFO_PROXYAUTH_AVAIL = UNKNOWN;
12921292
/**
12931293
* @var int
1294-
* @cvalue CURLOPT_FTP_RESPONSE_TIMEOUT
1294+
* @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT
1295+
* @alias CURLOPT_SERVER_RESPONSE_TIMEOUT
12951296
*/
12961297
const CURLOPT_FTP_RESPONSE_TIMEOUT = UNKNOWN;
1298+
/**
1299+
* @var int
1300+
* @cvalue CURLOPT_SERVER_RESPONSE_TIMEOUT
1301+
*/
1302+
const CURLOPT_SERVER_RESPONSE_TIMEOUT = UNKNOWN;
12971303
/**
12981304
* @var int
12991305
* @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
@@ -1695,7 +1695,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
16951695
case CURLOPT_HTTPAUTH:
16961696
case CURLOPT_FTP_CREATE_MISSING_DIRS:
16971697
case CURLOPT_PROXYAUTH:
1698-
case CURLOPT_FTP_RESPONSE_TIMEOUT:
1698+
case CURLOPT_SERVER_RESPONSE_TIMEOUT:
16991699
case CURLOPT_IPRESOLVE:
17001700
case CURLOPT_MAXFILESIZE:
17011701
case CURLOPT_TCP_NODELAY:

0 commit comments

Comments
 (0)