From 06dab650ac91edbbad4e04468866065580d4c644 Mon Sep 17 00:00:00 2001 From: dd32 Date: Tue, 5 Apr 2011 04:06:40 +0000 Subject: [PATCH] Return 4xx errors as a standard response from WP_HTTP, Brings it in line with the rest of the transports for 4xx error handling. See #17010 git-svn-id: http://svn.automattic.com/wordpress/trunk@17597 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 924e350d3..0aa38ce56 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -715,10 +715,6 @@ class WP_Http_Fsockopen { $arrHeaders = WP_Http::processHeaders( $process['headers'] ); - // Is the response code within the 400 range? - if ( (int) $arrHeaders['response']['code'] >= 400 && (int) $arrHeaders['response']['code'] < 500 ) - return new WP_Error('http_request_failed', $arrHeaders['response']['code'] . ': ' . $arrHeaders['response']['message']); - // If location is found, then assume redirect and redirect to location. if ( isset($arrHeaders['headers']['location']) && 0 !== $r['_redirection'] ) { if ( $r['redirection']-- > 0 ) {