The redirection is made even if CURLOPT_FOLLOWLOCATION is set to false.

So, there is something i don't understand, or there is an error in this if statement:
if ((in_array($browser->getResponseCode(), array(301, 307)) && in_array($method, array('GET', 'HEAD'))) || in_array($browser->getResponseCode(), array(302,303)))