[doc-en] master: Correct the documented default of the http follow_location option (#5845)
| From: | Louis-Arnaud via GitHub | Date: | Tue, 08 Sep 2026 14:26:59 +0000 |
| Subject: | [doc-en] master: Correct the documented default of the http follow_location option (#5845) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23731@lists.php.net to get a copy of this message | ||
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-09-08T16:26:56+02:00
Commit: https://github.com/php/doc-en/commit/313c83d7c99b46b5d05fdf67e7346719412f522a
Raw diff: https://github.com/php/doc-en/commit/313c83d7c99b46b5d05fdf67e7346719412f522a.diff
Correct the documented default of the http follow_location option (#5845)
Not setting the option and setting it to 1 are not equivalent. When it is absent, redirects are only
followed for the 300, 301, 302, 303, 307 and 308 response codes; when it is set, any response
carrying a Location header is followed regardless of its response code.
Changed paths:
M language/context/http.xml
Diff:
diff --git a/language/context/http.xml b/language/context/http.xml
index 3693060cc0cb..706b6c09fbe0 100644
--- a/language/context/http.xml
+++ b/language/context/http.xml
@@ -128,9 +128,14 @@
Follow <literal>Location</literal> header redirects. Set to
<literal>0</literal> to disable.
</para>
- <para>
- Defaults to <literal>1</literal>.
- </para>
+ <simpara>
+ When this option is not set, redirects are only followed for the
+ <literal>300</literal>, <literal>301</literal>,
<literal>302</literal>,
+ <literal>303</literal>, <literal>307</literal> and
<literal>308</literal>
+ response codes. Setting it to <literal>1</literal> is not equivalent:
+ any response carrying a <literal>Location</literal> header is then
+ followed, whatever its response code.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="context.http.max-redirects">