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
This commit is contained in:
dd32 2011-04-05 04:06:40 +00:00
parent 0ec5e89f63
commit 06dab650ac
1 changed files with 0 additions and 4 deletions

View File

@ -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 ) {