diff --git a/language/context/http.xml b/language/context/http.xml index 86d4a6ae5..d951ecb11 100644 --- a/language/context/http.xml +++ b/language/context/http.xml @@ -1,5 +1,5 @@ - + @@ -130,9 +130,14 @@ Sigue las redirecciones Location. Debe definirse como 0 para desactivar. - - Por omisión, vale 1. - + + Cuando esta opción no está definida, las redirecciones solo se siguen + para los códigos de respuesta 300, 301, + 302, 303, 307 y + 308. Definirla como 1 no es + equivalente: en ese caso se sigue cualquier respuesta que contenga un + encabezado Location, sea cual sea su código de respuesta. + @@ -258,8 +263,8 @@ $postdata = http_build_query( ] ); -$opts = ['http' => - [ +$opts = [ + 'http' => [ 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata, @@ -284,9 +289,9 @@ $result = file_get_contents('http://example.com/submit.php', false, $context); $url = "http://www.example.org/header.php"; -$opts = ['http' => - [ - 'method' => 'GET', +$opts = [ + 'http' => [ + 'method' => 'GET', 'max_redirects' => '0', 'ignore_errors' => '1', ]