diff --git a/lib/HttpClient/CurlClient.php b/lib/HttpClient/CurlClient.php index 13db222f6..aed0e9122 100644 --- a/lib/HttpClient/CurlClient.php +++ b/lib/HttpClient/CurlClient.php @@ -22,8 +22,8 @@ } // @codingStandardsIgnoreEnd -if (!defined('CURL_HTTP_VERSION_2_0')) { - define('CURL_HTTP_VERSION_2_0', 3); +if (!defined('CURL_HTTP_VERSION_2TLS')) { + define('CURL_HTTP_VERSION_2TLS', 4); } class CurlClient implements ClientInterface @@ -197,8 +197,8 @@ public function request($method, $absUrl, $headers, $params, $hasFile) $opts[CURLOPT_SSL_VERIFYPEER] = false; } - // Enable HTTP/2, if supported - $opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; + // For HTTPS requests, enable HTTP/2, if supported + $opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2TLS; list($rbody, $rcode) = $this->executeRequestWithRetries($opts, $absUrl);