From 2dbd5654cb9faff45bb51df9a2f3834bd320cc00 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 26 Nov 2020 12:26:00 +0100 Subject: [PATCH] Replace HTTPRequest's timeout by connect_timeout + read_timeout The timeout in 5.2 only applied to the connect() syscall. Guzzle's timeout option applies to the total transfer. Replace it by connect_timeout + read_timeout for backwards compatibility for code that expected the actual transfer to take an arbitrary amount of time. --- wcfsetup/install/files/lib/util/HTTPRequest.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index a3dd16ef89..2867920d99 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -166,7 +166,8 @@ final class HTTPRequest { }; $options = [ - 'timeout' => $this->options['timeout'], + 'connect_timeout' => $this->options['timeout'], + 'read_timeout' => $this->options['timeout'], 'allow_redirects' => [ 'max' => $this->options['maxDepth'], 'track_redirects' => true, -- 2.20.1