CA-381212 : The protocol is not always HTTP/1.1

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-08-21 13:48:16 +01:00
parent de1120f18b
commit 8644ed3d83

View File

@ -92,8 +92,7 @@ namespace XenAdmin.Actions
}
catch (HTTP.BadServerResponseException ex)
{
if (ex.Message.Contains("Received error code HTTP/1.1 404 Not Found\r\n from the server") ||
ex.Message.Contains("Received error code HTTP/1.1 500 Internal Server Error\r\n from the server"))
if (ex.Message.Contains("404 Not Found") || ex.Message.Contains("500 Internal Server Error"))
{
log.Warn(ex.Message);
log.Warn("Failed to retrieve available updates. See the server side logs for details.");