Ticket #17588: post-to-get-fsockopen.diff
File post-to-get-fsockopen.diff, 739 bytes (added by , 12 years ago) |
---|
-
wp-includes/class-http.php
781 781 // If location is found, then assume redirect and redirect to location. 782 782 if ( isset($arrHeaders['headers']['location']) && 0 !== $r['_redirection'] ) { 783 783 if ( $r['redirection']-- > 0 ) { 784 if ( in_array( $arrHeaders['response']['code'], array( 302, 303 ) ) && 'POST' == $r['method'] ) 785 $r['method'] = 'GET'; 786 784 787 return $this->request( WP_HTTP::make_absolute_url( $arrHeaders['headers']['location'], $url ), $r); 785 788 } else { 786 789 return new WP_Error('http_request_failed', __('Too many redirects.'));