Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

Unsafe use of HttpClient per request #6623

Open changov opened 6 years ago

changov commented 6 years ago

https://github.com/Azure/azure-powershell/blob/bbe5ee957de07032bcf7f9062bba91cceee62565/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestClientBase.cs#L221

The proper usage is [finally] documented in the Remarks section here: https://msdn.microsoft.com/en-us/library/system.net.http.httpclient%28v=vs.110%29.aspx . Here's a sample report of what happens with per-request instance of HttpClient: https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/ .

cormacpayne commented 6 years ago

@Tiano2017 @ravbhatnagar would you mind taking a look at this issue?

Tiano2017 commented 4 years ago

This is a valid ask. We'll create a work item to fix these.