Make WordPress Core


Ignore:
Timestamp:
04/05/2011 04:06:40 AM (14 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-http.php

    r17566 r17597  
    715715
    716716        $arrHeaders = WP_Http::processHeaders( $process['headers'] );
    717 
    718         // Is the response code within the 400 range?
    719         if ( (int) $arrHeaders['response']['code'] >= 400 && (int) $arrHeaders['response']['code'] < 500 )
    720             return new WP_Error('http_request_failed', $arrHeaders['response']['code'] . ': ' . $arrHeaders['response']['message']);
    721717
    722718        // If location is found, then assume redirect and redirect to location.
Note: See TracChangeset for help on using the changeset viewer.