php-doc-en/reference/curl
Ayesh Karunaratne 61f5c7a1f5 Fix CURLOPT_MAXREDIRS/FOLLOWLOCATION descriptions
Currently, the description for `CURLOPT_FOLLOWLOCATION` and `CURLOPT_MAXREDIRS` indicates that unless a `CURLOPT_MAXREDIRS` value is set, Curl will do an infinite loop.

However, this is not the case, because PHP internally sets a default value of 20. Please see:
 - [`ext/curl/interface.c`](d0e3fb495f/ext/curl/interface.c (L1806))
 - [PHP Curl Security Hardening: Infinite loops](https://php.watch/articles/php-curl-security-hardening#infinite-redirects)
 - [Libcurl: CURLOPT_MAXREDIRS.html](https://curl.se/libcurl/c/CURLOPT_MAXREDIRS.html)

The default libcurl behavior is indeed to not limit the number of redirects, which enables infinite loops, but I think we probably should keep the PHP's sane default of 20, and update the documentation instead.

Closes GH-371.
2021-01-22 14:02:21 +01:00
..
curlfile curl_file_create() is not a method of CURLFile 2020-11-25 13:30:11 +00:00
functions Fix CURLOPT_MAXREDIRS/FOLLOWLOCATION descriptions 2021-01-22 14:02:21 +01:00
book.xml Document new opaque classes which replace resources 2020-12-06 22:11:40 +00:00
configure.xml Remove PHP 4 related info 2019-03-01 18:32:27 +00:00
constants.xml Use canonical type names 2020-11-02 15:39:04 +00:00
curlfile.xml curl_file_create() is not a method of CURLFile 2020-11-25 13:30:11 +00:00
curlhandle.xml Document new opaque classes which replace resources 2020-12-06 22:11:40 +00:00
curlmultihandle.xml Document new opaque classes which replace resources 2020-12-06 22:11:40 +00:00
curlsharehandle.xml Document new opaque classes which replace resources 2020-12-06 22:11:40 +00:00
examples.xml add a check for curl_error and write error to file 2019-12-04 10:44:47 +00:00
ini.xml Revert useless change in 326638 2012-02-29 00:24:15 +00:00
reference.xml
setup.xml Generate curl methodsynopses based on stubs 2020-11-25 00:58:58 +00:00
versions.xml Added PHP 8 into versions.xml for curl based on stubs. 2021-01-17 15:52:30 +01:00