summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--UPGRADING2
-rw-r--r--ext/curl/multi.c13
3 files changed, 15 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index debd28573d..01d879f3b0 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ PHP NEWS
. Fixed bug #76480 (Use curl_multi_wait() so that timeouts are respected).
(Pierrick)
. Implemented FR #77711 (CURLFile should support UNICODE filenames). (cmb)
+ . Deprecated CURLPIPE_HTTP1. (cmb)
- Date:
. Fixed bug #75232 (print_r of DateTime creating side-effect). (Nikita)
diff --git a/UPGRADING b/UPGRADING
index 3f6dcb7427..1b54d10482 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -41,6 +41,8 @@ PHP 7.4 UPGRADE NOTES
- Curl:
. Attempting to serialize a CURLFile class will now generate an exception.
Previously the exception was only thrown on unserialization.
+ . Using CURLPIPE_HTTP1 is deprecated, and is no longer supported as of cURL
+ 7.62.0.
- Date:
. Calling var_dump() or similar on a DateTime(Immutable) instance will no
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index bee05838fa..fafcad3263 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -564,8 +564,19 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
case CURLMOPT_MAX_PIPELINE_LENGTH:
case CURLMOPT_MAX_TOTAL_CONNECTIONS:
#endif
- error = curl_multi_setopt(mh->multi, option, zval_get_long(zvalue));
+ {
+ zend_long lval = zval_get_long(zvalue);
+
+ if (option == CURLMOPT_PIPELINING && (lval & 1)) {
+#if LIBCURL_VERSION_NUM >= 0x073e00 /* 7.62.0 */
+ php_error_docref(NULL, E_WARNING, "CURLPIPE_HTTP1 is no longer supported");
+#else
+ php_error_docref(NULL, E_DEPRECATED, "CURLPIPE_HTTP1 is deprecated");
+#endif
+ }
+ error = curl_multi_setopt(mh->multi, option, lval);
break;
+ }
#if LIBCURL_VERSION_NUM > 0x072D00 /* Available since 7.45.0 */
case CURLMOPT_PUSHFUNCTION:
if (mh->handlers->server_push == NULL) {