From 14d2e5d358bfd467c9db1d818330e08535eccf06 Mon Sep 17 00:00:00 2001 From: Dion Hulse 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: https://develop.svn.wordpress.org/trunk@17597 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 924e350d34..0aa38ce567 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 ) {