mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -148,7 +148,7 @@ class Requests {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '2.0.6';
|
||||
const VERSION = '2.0.8';
|
||||
|
||||
/**
|
||||
* Selected transport name
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user