Skip to content

Commit b01a2c4

Browse files
committed
Updating the userAgent to just use the UserAgents from the management client
1 parent 8951051 commit b01a2c4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/ServiceManagement/Services/Commands.Utilities/Websites/WebsitesClient.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,10 +1362,10 @@ private DeploymentBaseOptions CreateRemoteDeploymentBaseOptions(string websiteNa
13621362
TempAgent = false
13631363
};
13641364

1365-
var azureSessionUserAgent = GetDeploymentBaseOptionsUserAgent();
1366-
if (!string.IsNullOrEmpty(azureSessionUserAgent))
1365+
var userAgent = GetDeploymentBaseOptionsUserAgent();
1366+
if (!string.IsNullOrEmpty(userAgent))
13671367
{
1368-
remoteBaseOptions.UserAgent = azureSessionUserAgent;
1368+
remoteBaseOptions.UserAgent = userAgent;
13691369
}
13701370

13711371
return remoteBaseOptions;
@@ -1379,9 +1379,7 @@ private string GetDeploymentBaseOptionsUserAgent()
13791379
{
13801380
var userAgent = string.Empty;
13811381
var managementClient = this.WebsiteManagementClient as WebSiteManagementClient;
1382-
var userAgents = AzureSession.ClientFactory.UserAgents.Any()
1383-
? AzureSession.ClientFactory.UserAgents as IEnumerable<ProductInfoHeaderValue>
1384-
: (managementClient != null) ? managementClient.UserAgent : null;
1382+
var userAgents = managementClient != null ? managementClient.UserAgent : null;
13851383

13861384
if (userAgents != null)
13871385
{

0 commit comments

Comments
 (0)