From 5fc31716dd4676318b9857f8ce3bd2e9afd6a5ca Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 7 Dec 2019 18:58:17 +0100 Subject: [PATCH] Avoid using CURLPIPE_HTTP1 in php7.4+ --- src/Composer/Util/Http/CurlDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Http/CurlDownloader.php b/src/Composer/Util/Http/CurlDownloader.php index 99ee1ca3c..ee93ca364 100644 --- a/src/Composer/Util/Http/CurlDownloader.php +++ b/src/Composer/Util/Http/CurlDownloader.php @@ -74,7 +74,7 @@ class CurlDownloader $this->multiHandle = $mh = curl_multi_init(); if (function_exists('curl_multi_setopt')) { - curl_multi_setopt($mh, CURLMOPT_PIPELINING, /*CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX*/ 3); + curl_multi_setopt($mh, CURLMOPT_PIPELINING, PHP_VERSION_ID >= 70400 ? /* CURLPIPE_MULTIPLEX */ 2 : /*CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX*/ 3); if (defined('CURLMOPT_MAX_HOST_CONNECTIONS')) { curl_multi_setopt($mh, CURLMOPT_MAX_HOST_CONNECTIONS, 8); }