Skip to content

Commit 871d53c

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 602a4ac commit 871d53c

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
@@ -15,6 +15,10 @@ PHP NEWS
1515
. Fixed bug GH-15501 (Windows HAVE_<header>_H macros defined to 1 or
1616
undefined). (Peter Kokot)
1717

18+
- Curl:
19+
. Added CURLOPT_SERVER_RESPONSE_TIMEOUT, which was formerly known as
20+
CURLOPT_FTP_RESPONSE_TIMEOUT. (Ayesh Karunaratne)
21+
1822
- Date:
1923
. Fixed bug GH-13773 (DatePeriod not taking into account microseconds for end
2024
date). (Mark Bennewitz, Derick)

UPGRADING

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

274276
- Date:
275277
. Added static methods
@@ -934,6 +936,7 @@ PHP 8.4 UPGRADE NOTES
934936
. CURL_HTTP_VERSION_3.
935937
. CURL_HTTP_VERSION_3ONLY.
936938
. CURL_TCP_KEEPCNT
939+
. CURLOPT_SERVER_RESPONSE_TIMEOUT.
937940

938941
- Intl:
939942
. 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
@@ -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)