Ticket #17588: 17588.diff
| File 17588.diff, 738 bytes (added by , 13 years ago) |
|---|
-
wp-includes/class-http.php
800 800 // If location is found, then assume redirect and redirect to location. 801 801 if ( isset($arrHeaders['headers']['location']) && 0 !== $r['_redirection'] ) { 802 802 if ( $r['redirection']-- > 0 ) { 803 if ( in_array( $arrHeaders['response']['code'], array( 302, 303 ) ) && 'POST' == $r['method'] ) 804 $r['method'] = 'GET'; 805 803 806 return wp_remote_request( WP_HTTP::make_absolute_url( $arrHeaders['headers']['location'], $url ), $r); 804 807 } else { 805 808 return new WP_Error('http_request_failed', __('Too many redirects.'));