From e1d1163c159a5b8278fc3d00c373f1169d0aa99e Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:19:29 +0200 Subject: [PATCH] [win] specify accept header when downloading mysql meta (#8009) as reported in https://github.com/actions/runner-images/issues/8004 dev.mysql.com behaviour has changed, it requires "Accept: text/html" for download page Co-authored-by: Miguel Nieto --- images/win/scripts/Installers/Install-MysqlCli.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-MysqlCli.ps1 b/images/win/scripts/Installers/Install-MysqlCli.ps1 index 300e3b0c..dd3be4bc 100644 --- a/images/win/scripts/Installers/Install-MysqlCli.ps1 +++ b/images/win/scripts/Installers/Install-MysqlCli.ps1 @@ -15,7 +15,7 @@ Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentLi $MysqlVersionMajorMinor = $MysqlVersion.ToString(2) if ($MysqlVersion.Build -lt 0) { - $MysqlVersion = (Invoke-RestMethod -Uri "https://dev.mysql.com/downloads/mysql/${MysqlVersionMajorMinor}.html" | + $MysqlVersion = (Invoke-RestMethod -Uri "https://dev.mysql.com/downloads/mysql/${MysqlVersionMajorMinor}.html" -Headers @{'Accept'='text/html'} | Select-String -Pattern "${MysqlVersionMajorMinor}\.\d+").Matches.Value }