#76606[HTTP][timeout] = 0 makes fopen() fail
Description
The default setting of [HTTP][timeout] = 0 seems to be an invalid setting for the fopen() HTTP-Requests which are made by the GuzzleHttp-Library.
If the timeout is set to 0 this results in the following $context array which is passed to the stream_context_create()-function by GuzzleHttp:
Array
(
[http] => Array
(
[method] => GET
[header] => User-Agent: TYPO3/8.1.2
Host: get.typo3.org
Content-Length: 0
Connection: close
[protocol_version] => 1.1
[ignore_errors] => 1
[follow_location] => 0
[timeout] => 0
)
[ssl] => Array
(
[verify_peer] => 1
[verify_peer_name] => 1
[allow_self_signed] =>
)
)
(notice the timeout => 0)
The fopen() call after that will fail (without throwing or logging ANY error):
$resource = fopen($request->getUri(), 'r', null, $context);
If the timeout is set to a higher value or removed from the array it seems to work.
I’d recommend to change the default setting to 10 (as [HTTP][connect_timeout] is configured) and change the description, because ..
Integer: Default timeout for whole request. Exception will be thrown if sending the request takes more than this number of seconds. Should be greater than connection timeout (see above) or “0” to not set a limit. Defaults to “0”.
.. seems to be not true anymore.
My installation: Ubuntu Server 16.04 LTS, Apache/2.4.18, PHP7.0, Typo3 8.1.2
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.