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

git-svn-id: http://core.svn.wordpress.org/trunk@23608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-03-04 05:17:05 +00:00
parent 46a4d2d295
commit d4b814df2f

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 );