xtqqczze

Results 219 comments of xtqqczze

@NoMoreFood If you set `$Request.KeepAlive = $false` in your example the performance is also the same.

PowerShell 7 actually sends the `Connection: Keep-Alive` header, but than opens a new connection for every request.

According to https://github.com/dotnet/runtime/issues/31267, .NET Core does not currently support TCP KeepAlive in System.Net.HttpClient. There is an open issue to fix this: https://github.com/dotnet/runtime/issues/28721 and underlying issue https://github.com/dotnet/runtime/issues/1793, which are tracking the...

It appears that TCP KeepAliveHTTP persistent connections are supported in certain circumstances. If a singular `HttpClient` is declared and reused for each request, TCP connection reuse occurs and performance is...

So the the difference in perfomance is due the fact Windows PowerShell 5 pools connections between seperate instances of `[System.Net.WebRequest]`, and PowerShell 7 does not. As far as I can...

> > > for fun, i tried the `-SessionVariable` / `-WebSession` options to see if it would help (kinda like Python above). it didn't. These parameters did not work for...

@iSazonov I will revert all changes not part of the CodeFix, and suppress the rule with the justification linking to the tracking issue: #13909

Rebased and fixed up to address @iSazonov review.