﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
10624	Redirection should be disabled for HEAD requests	dd32	dd32	"Updated:

Currently, HEAD requests will follow redirections in some(or all) transports. HEAD requests should not follow redirects.

----
Original:

Currently if you request a URL that attempts to redirect past your redirection limit, you'll get a object similar to this:

{{{
object(WP_Error)#106 (2) {
  [""errors""]=>
  array(1) {
    [""http_request_failed""]=>
    array(1) {
      [0]=>
      string(30) ""Maximum (0) redirects followed""
    }
  }
  [""error_data""]=>
  array(0) {
  }
}
}}}

The major problem with this is that its impossible to retrieve the location its being  redirected to.

Right now, I'm using wp_remote_head() to check if its redirecting to a different location, Unfortunately thats not possible... 

I'll add a patch which adds the location header to the error data objects

But i'm also tempted to suggest, that if its a HEAD request (Or really, any request) and redirects are set to 0, then it shouldnt attempt to redirect at all, and simply return the headers as is (ie. as a 301 with a location header and possibly empty body)"	defect (bug)	closed	normal	3.0	HTTP	2.9	normal	fixed	has-patch	westi
