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
This commit is contained in:
Dion Hulse 2011-04-05 04:06:40 +00:00
parent bf777d1369
commit 14d2e5d358
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 ) {