HTTP API No Follow Redirection
|Reported by:||TheDeadMedic||Owned by:||dd32|
As highlighted in the following discussions, there's an issue when we don't want to follow redirects. On closer inspection, I believe only the cURL component is affected.
Currently, WP_Http_Curl will throw a WP_Error if a redirection header was recieved, and the redirection argument is zero.
Maximum redirects followed (0)
The FOLLOWLOCATION option must be false, otherwise cURL treats the result as an error.
if ( !$r['redirection'] ) curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, false );
As I say, as far as I know only cURL component is affected.