kriswallsmith/Buzz — pull request #165 by egeloen (2014-08-03 16:15:25+00:00)
Title: [Client][Stream] Fix max redirects with PHP < 5.3.4

Hey!

This PR fixes an issue with the previous patch I have submitted (#163). Basically, `follow_location` has been added in PHP 5.3.4, so in the previous version we must use `max_redirects` otherwise the redirects behavior is enabled. I have tested it and my conclusion is:

- PHP < 5.3.4: If we set `max_redirects` to 1 and `ignore_errors` to false, the 302 is returned
- PHP >= 5.3.4: If we set `follow_location` to false, `max_redirects` to 1 and `ignore_errors` to false, the 302 is returned.

My tests are https://travis-ci.org/egeloen/ivory-http-adapter/builds/31553140 (fail) and https://travis-ci.org/egeloen/ivory-http-adapter/builds/31554119 (pass)