diff --git a/src/wp-includes/Requests/src/Requests.php b/src/wp-includes/Requests/src/Requests.php index 287bacaaa575b..edf37f2214983 100644 --- a/src/wp-includes/Requests/src/Requests.php +++ b/src/wp-includes/Requests/src/Requests.php @@ -148,7 +148,7 @@ class Requests { * * @var string */ - const VERSION = '2.0.6'; + const VERSION = '2.0.8'; /** * Selected transport name diff --git a/src/wp-includes/Requests/src/Transport/Curl.php b/src/wp-includes/Requests/src/Transport/Curl.php index 7316987b5faed..29034b25d5358 100644 --- a/src/wp-includes/Requests/src/Transport/Curl.php +++ b/src/wp-includes/Requests/src/Transport/Curl.php @@ -25,6 +25,7 @@ final class Curl implements Transport { const CURL_7_10_5 = 0x070A05; const CURL_7_16_2 = 0x071002; + const CURL_7_22_0 = 0x071600; /** * Raw HTTP data @@ -363,7 +364,7 @@ private function setup_handle($url, $headers, $data, $options) { $options['hooks']->dispatch('curl.before_request', [&$this->handle]); // Force closing the connection for old versions of cURL (<7.22). - if (!isset($headers['Connection'])) { + if ($this->version < self::CURL_7_22_0 && !isset($headers['Connection'])) { $headers['Connection'] = 'close'; }