summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Morel <benjamin.morel@gmail.com>2017-12-06 03:35:12 +0100
committerNikita Popov <nikita.ppv@gmail.com>2018-02-03 20:43:18 +0100
commit85021a399399169ad153e73663dd7e2ef0809ee6 (patch)
tree63c96e726a6125423dc6350a98f521edfb300616
parentc58b307833432eabd8806b15ea12a2beec7d5657 (diff)
downloadphp-git-85021a399399169ad153e73663dd7e2ef0809ee6.tar.gz
Add CURLOPT_REQUEST_TARGET constant
-rw-r--r--UPGRADING3
-rw-r--r--ext/curl/interface.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/UPGRADING b/UPGRADING
index 36273e50c0..5aee1ed5a9 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -165,6 +165,9 @@ JSON:
10. New Global Constants
========================================
+Curl:
+ . CURLOPT_REQUEST_TARGET
+
JSON:
. JSON_THROW_ON_ERROR
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index cc6232218a..b4c0bddf1d 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1345,6 +1345,10 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_TCP_FASTOPEN);
#endif
+#if LIBCURL_VERSION_NUM >= 0x073700 /* Available since 7.55.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_REQUEST_TARGET);
+#endif
+
#if CURLOPT_FTPASCII != 0
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
#endif
@@ -2368,6 +2372,9 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
#if LIBCURL_VERSION_NUM >= 0x072d00 /* Available since 7.45.0 */
case CURLOPT_DEFAULT_PROTOCOL:
#endif
+#if LIBCURL_VERSION_NUM >= 0x073700 /* Available since 7.55.0 */
+ case CURLOPT_REQUEST_TARGET:
+#endif
{
zend_string *tmp_str;
zend_string *str = zval_get_tmp_string(zvalue, &tmp_str);