From 4920adb477cc8ac74faf333f8358da489535ec66 Mon Sep 17 00:00:00 2001 From: costdev Date: Mon, 11 Sep 2023 10:33:19 +0000 Subject: [PATCH] External Libraries: Update the Requests library to version 2.0.8. This is a maintenance release with minor changes: - Only force close cURL connection when needed (cURL < 7.22). References: - [https://github.com/WordPress/Requests/releases/tag/v2.0.8 Requests 2.0.8 release notes] - [https://github.com/WordPress/Requests/compare/v2.0.6...v2.0.8 Full list of changes in Requests 2.0.8] Follow-up to [54997], [55007], [55046], [55225], [55296], [55629]. Props jrf, mukesh27, spacedmonkey, costdev. Fixes #59322. Built from https://develop.svn.wordpress.org/trunk@56554 git-svn-id: http://core.svn.wordpress.org/trunk@56066 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/Requests/src/Requests.php | 2 +- wp-includes/Requests/src/Transport/Curl.php | 3 ++- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/Requests/src/Requests.php b/wp-includes/Requests/src/Requests.php index 287bacaaa5..edf37f2214 100644 --- a/wp-includes/Requests/src/Requests.php +++ b/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/wp-includes/Requests/src/Transport/Curl.php b/wp-includes/Requests/src/Transport/Curl.php index 7316987b5f..29034b25d5 100644 --- a/wp-includes/Requests/src/Transport/Curl.php +++ b/wp-includes/Requests/src/Transport/Curl.php @@ -25,6 +25,7 @@ use WpOrg\Requests\Utility\InputValidator; 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 @@ final class Curl implements Transport { $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'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 887732458b..c116ff2cfb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56553'; +$wp_version = '6.4-alpha-56554'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.