mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
Update DownloadAndUpdateClientAction
to not prepend param name when downloading
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
parent
1b3b4b218d
commit
7b18b3b105
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -37,6 +36,7 @@ using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using XenAdmin.Core;
|
||||
using XenCenterLib;
|
||||
|
||||
namespace XenAdmin.Actions.Updates
|
||||
@ -105,13 +105,17 @@ namespace XenAdmin.Actions.Updates
|
||||
//start the download
|
||||
_updateDownloadState = DownloadState.InProgress;
|
||||
|
||||
var uriBuilder = new UriBuilder(_address);
|
||||
|
||||
if (!string.IsNullOrEmpty(_authToken))
|
||||
{
|
||||
NameValueCollection myQueryStringCollection = new NameValueCollection();
|
||||
myQueryStringCollection.Add(XenAdminConfigManager.Provider.GetInternalStageAuthTokenName(), _authToken);
|
||||
_client.QueryString = myQueryStringCollection;
|
||||
var uri = uriBuilder.Uri;
|
||||
if (!uri.IsFile)
|
||||
{
|
||||
uriBuilder.Query = Helpers.AddAuthTokenToQueryString(_authToken, uriBuilder.Query);
|
||||
}
|
||||
}
|
||||
_client.DownloadFileAsync(_address, _outputPathAndFileName);
|
||||
_client.DownloadFileAsync(uriBuilder.Uri, _outputPathAndFileName);
|
||||
|
||||
bool updateDownloadCancelling = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user