Skip to content

Commit 46c1f6f

Browse files
committed
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] - [WordPress/Requests@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. git-svn-id: https://develop.svn.wordpress.org/trunk@56554 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2453a6b commit 46c1f6f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/wp-includes/Requests/src/Requests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class Requests {
148148
*
149149
* @var string
150150
*/
151-
const VERSION = '2.0.6';
151+
const VERSION = '2.0.8';
152152

153153
/**
154154
* Selected transport name

src/wp-includes/Requests/src/Transport/Curl.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
final class Curl implements Transport {
2626
const CURL_7_10_5 = 0x070A05;
2727
const CURL_7_16_2 = 0x071002;
28+
const CURL_7_22_0 = 0x071600;
2829

2930
/**
3031
* Raw HTTP data
@@ -363,7 +364,7 @@ private function setup_handle($url, $headers, $data, $options) {
363364
$options['hooks']->dispatch('curl.before_request', [&$this->handle]);
364365

365366
// Force closing the connection for old versions of cURL (<7.22).
366-
if (!isset($headers['Connection'])) {
367+
if ($this->version < self::CURL_7_22_0 && !isset($headers['Connection'])) {
367368
$headers['Connection'] = 'close';
368369
}
369370

0 commit comments

Comments
 (0)