CA-381017: Pass OriginalString when fetching EUA

The `Uri` constructor removes `:` after the IP/Host name for NFS storage

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-08-07 17:25:31 +01:00 committed by Konstantina Chremmou
parent ca3ed31136
commit 533c313600
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ namespace XenAdmin.Diagnostics.Checks
private void FetchHostEua(Host host)
{
string eua = null;
if (Helpers.YangtzeOrGreater(host) && !Helpers.TryLoadHostEua(host, _targetUri, out eua))
if (Helpers.YangtzeOrGreater(host) && !Helpers.TryLoadHostEua(host, _targetUri?.OriginalString, out eua))
{
Log.Warn($"Could not fetch EUA file for {host.Name()}");
lock (_hostsFailedToFetchEua)

View File

@ -1576,7 +1576,7 @@ namespace XenAdmin.Core
return queryString;
}
public static bool TryLoadHostEua(Host host, Uri targetUri, out string eua)
public static bool TryLoadHostEua(Host host, string targetUri, out string eua)
{
eua = null;
if (host == null || targetUri == null)
@ -1585,7 +1585,7 @@ namespace XenAdmin.Core
}
var args = new Dictionary<string, string>
{
{ "url", targetUri.ToString()}
{ "url", targetUri }
};
try