diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php index 1527cfe9d4..6c09cce831 100644 --- a/phpBB/phpbb/file_downloader.php +++ b/phpBB/phpbb/file_downloader.php @@ -51,6 +51,10 @@ class file_downloader return new Client([ 'base_uri' => $host, 'timeout' => $timeout, + 'headers' => [ + 'user-agent' => 'phpBB/' . PHPBB_VERSION, + 'accept' => '*/*', + ], ]); } diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php index 8986bede0c..3f4ecd01df 100644 --- a/phpBB/phpbb/version_helper.php +++ b/phpBB/phpbb/version_helper.php @@ -382,7 +382,7 @@ class version_helper } else if ($info === false || $force_update) { - $info = $this->file_downloader->get($this->host, $this->path, $this->file, $this->use_ssl ? 443 : 80); + $info = $this->file_downloader->get($this->host, $this->path, $this->file, $this->use_ssl ? 443 : 80, 30); $error_string = $this->file_downloader->get_error_string(); if (!empty($error_string))