WP_HTTP: Fix returning WP_Error's on too-many-redirects after r23603 See #23682

git-svn-id: https://develop.svn.wordpress.org/trunk@23608 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-03-04 05:17:05 +00:00
parent 86a9ca48a1
commit c267aa97a8

View File

@ -109,8 +109,9 @@ class WP_Http {
$r = wp_parse_args( $args, $defaults );
$r = apply_filters( 'http_request_args', $r, $url );
// Certain classes decrement this, store a copy of the original value for loop purposes.
$r['_redirection'] = $r['redirection'];
// The transports decrement this, store a copy of the original value for loop purposes.
if ( ! isset( $r['_redirection'] ) )
$r['_redirection'] = $r['redirection'];
// Allow plugins to short-circuit the request
$pre = apply_filters( 'pre_http_request', false, $r, $url );