﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
20434,cURL fails to follow redirects sometimes,evansolomon,ryan,"r20208 changed the way WP_HTTP (specifically cURL) handles redirects, and as a result broke the way it handles some redirects (both 301 and 302) that were previously working.  It doesn't fail on all 301/302 redirects.  

At first I thought it failed only for requests with more than 1 redirect, but in testing with the Quantcast top 100 lists (assuming these sites should have no problems loading usually) I found an exception to that rule in http://facebook.com, which works and has 2 redirects.  Then I thought it only failed for requests with more than 1 301 redirect, but I found an exception to that in http://dailymotion.com, which fails and only has 1 301 redirect (and a 302).

Here are a couple examples that fail using wp_remote_get(): http://skype.com, http://microsoft.com, http://dailymotion.com, 

Here are a couple from the same list that work (and go through redirects): http://google.com, http://facebook.com, http://yahoo.com

As of r20208 wp_remote_get() returns empty arrays and strings for headers, body, response, etc.  As of r20370 the same failed requests return a WP_Error object with an error code of 'http_request_failed' and an error message of ' malformed' (including the leading space).  As of r20460 the same WP_Error objects are still returned.",defect (bug),closed,high,3.4,HTTP,3.4,critical,fixed,needs-unit-tests has-patch,
