Merge pull request #6754 from rxu/ticket/17443

[ticket/17443] Fix various Guzzle client issues for version checks
This commit is contained in:
Marc Alexander 2024-12-08 17:23:34 +01:00 committed by GitHub
commit e73ba63590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -51,6 +51,10 @@ class file_downloader
return new Client([
'base_uri' => $host,
'timeout' => $timeout,
'headers' => [
'user-agent' => 'phpBB/' . PHPBB_VERSION,
'accept' => '*/*',
],
]);
}

View file

@ -381,7 +381,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))