From 88ceaba2d2aaafb5e94eb97160cd40072e77ef35 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 8 Oct 2014 05:19:20 +0000 Subject: [PATCH] Return the correct server response for the 'message' response field from the server. Previously this would use the generic message corresponding to the response code, which isn't always accurate. Since we're already parsing the headers, we can simply return that directly (This also has the benefit that it's the same code for both Streams and Curl header handling). Fixes #28919 Built from https://develop.svn.wordpress.org/trunk@29848 git-svn-id: http://core.svn.wordpress.org/trunk@29611 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 6 +----- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index d925a07b54..3cfdee4a93 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1442,10 +1442,6 @@ class WP_Http_Curl { } } - $response = array(); - $response['code'] = curl_getinfo( $handle, CURLINFO_HTTP_CODE ); - $response['message'] = get_status_header_desc($response['code']); - curl_close( $handle ); if ( $r['stream'] ) @@ -1454,7 +1450,7 @@ class WP_Http_Curl { $response = array( 'headers' => $theHeaders['headers'], 'body' => null, - 'response' => $response, + 'response' => $theHeaders['response'], 'cookies' => $theHeaders['cookies'], 'filename' => $r['filename'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 67438ae2ff..5cf6496573 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-20141007'; +$wp_version = '4.1-alpha-20141008'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.