Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions language/context/http.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: aa42c6da04101f58317a901ccc38ee0d1faeab47 Maintainer: PhilDaiguille Status: ready -->
<!-- EN-Revision: 313c83d7c99b46b5d05fdf67e7346719412f522a Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: no -->

<refentry xml:id="context.http" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false" role="stream_context_option">
Expand Down Expand Up @@ -130,9 +130,14 @@
Sigue las redirecciones <literal>Location</literal>.
Debe definirse como <literal>0</literal> para desactivar.
</para>
<para>
Por omisión, vale <literal>1</literal>.
</para>
<simpara>
Cuando esta opción no está definida, las redirecciones solo se siguen
para los códigos de respuesta <literal>300</literal>, <literal>301</literal>,
<literal>302</literal>, <literal>303</literal>, <literal>307</literal> y
<literal>308</literal>. Definirla como <literal>1</literal> no es
equivalente: en ese caso se sigue cualquier respuesta que contenga un
encabezado <literal>Location</literal>, sea cual sea su código de respuesta.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="context.http.max-redirects">
Expand Down Expand Up @@ -258,8 +263,8 @@ $postdata = http_build_query(
]
);

$opts = ['http' =>
[
$opts = [
'http' => [
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata,
Expand All @@ -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',
]
Expand Down