mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +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;
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -37,6 +36,7 @@ using System.Net;
|
|||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using XenAdmin.Core;
|
||||||
using XenCenterLib;
|
using XenCenterLib;
|
||||||
|
|
||||||
namespace XenAdmin.Actions.Updates
|
namespace XenAdmin.Actions.Updates
|
||||||
@ -105,13 +105,17 @@ namespace XenAdmin.Actions.Updates
|
|||||||
//start the download
|
//start the download
|
||||||
_updateDownloadState = DownloadState.InProgress;
|
_updateDownloadState = DownloadState.InProgress;
|
||||||
|
|
||||||
|
var uriBuilder = new UriBuilder(_address);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(_authToken))
|
if (!string.IsNullOrEmpty(_authToken))
|
||||||
{
|
{
|
||||||
NameValueCollection myQueryStringCollection = new NameValueCollection();
|
var uri = uriBuilder.Uri;
|
||||||
myQueryStringCollection.Add(XenAdminConfigManager.Provider.GetInternalStageAuthTokenName(), _authToken);
|
if (!uri.IsFile)
|
||||||
_client.QueryString = myQueryStringCollection;
|
{
|
||||||
|
uriBuilder.Query = Helpers.AddAuthTokenToQueryString(_authToken, uriBuilder.Query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_client.DownloadFileAsync(_address, _outputPathAndFileName);
|
_client.DownloadFileAsync(uriBuilder.Uri, _outputPathAndFileName);
|
||||||
|
|
||||||
bool updateDownloadCancelling = false;
|
bool updateDownloadCancelling = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user