Patch fopen_follow_location for Streams related Bug #64433
Patch version 2013-03-15 16:41 UTC
Return to Bug #64433 |
Download this patch
Patch Revisions:
Developer: akbarovs@gmail.com
734c734,736
< if (context && php_stream_context_get_option(context, "http", "follow_location", &tmpzval) == SUCCESS) {
---
> /* we only care about Location for 300, 301, 302, 303 and 307 */
> /* see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1 */
> if ((response_code >= 300 && response_code < 304 || 307 == response_code) && context && php_stream_context_get_option(context, "http", "follow_location", &tmpzval) == SUCCESS) {
738,742d739
< } else if (!(response_code >= 300 && response_code < 304 || 307 == response_code)) {
< /* we shouldn't redirect automatically
< if follow_location isn't set and response_code not in (300, 301, 302, 303 and 307)
< see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1 */
< follow_location = 0;
|