diff --git a/wp-includes/Requests/Transport/cURL.php b/wp-includes/Requests/Transport/cURL.php index 5f5c5dfb0a..04914440e6 100644 --- a/wp-includes/Requests/Transport/cURL.php +++ b/wp-includes/Requests/Transport/cURL.php @@ -309,6 +309,11 @@ class Requests_Transport_cURL implements Requests_Transport { protected function setup_handle($url, $headers, $data, $options) { $options['hooks']->dispatch('curl.before_request', array(&$this->handle)); + // Force closing the connection for old versions of cURL (<7.22). + if ( ! isset( $headers['Connection'] ) ) { + $headers['Connection'] = 'close'; + } + $headers = Requests::flatten($headers); if (!empty($data)) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 3fb973936d..c0195b2b58 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37429'; +$wp_version = '4.6-alpha-37430'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.