php/php-src — pull request #303 by akbarovs (2013-03-15 17:03:15+00:00)
Title: Bugfix for  #64433 follow_location parameter of context is ignored for most response codes

Please see: https://bugs.php.net/bug.php?id=64433

I changed the code to follow redirects for 3xx response codes only. If response code is not in 3xx - we do not follow location if 'follow_location' parameter is not set. If 'follow_location' context parameter is set -> we do/do not redirect without checking response code (We cannot restrict to do redirect if somebody want it)