- The GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead test has been failing with some regularity in CI, with strange GatewayTimeout errors. I don't know why this particular test is so much more susceptible to that, but I've changed the test to use a local loopback server rather than an external site.
- The SendAsync_ReadFromSlowStreamingServer_PartialDataReturned test was relying on timings from the server that might not always be correct, and due to internal differences between curl and WinHttp were very frequently wrong on Unix such that the test was disabled there. I reimplemented it with a local loopback server, too.
- I've added another mini-stress test, with posts instead of gets.
Commit migrated from https://github.com/dotnet/corefx/commit/9b6a0224c3e404afe3f2c58dfb59e2068391c879
We've standardized on using Unix in most cases where we only cross-
compile once for Unix. This change cleans up mentions of Linux/OSX when
we aren't actually cross-compiling for those OSes.
The remaining projects that still cross-compile for Linux/OSX are:
System.Diagnostics.Process
System.IO.FileSystem.Watcher
System.Net.NetworkInformation
The System.Net.Security functional tests seem to still have a distinct
difference in functional behavior on OSX so I have also left these
configured to cross-compile for Linux/OSX.
Commit migrated from https://github.com/dotnet/corefx/commit/16ee317fa4e194ff7cf61e923caf103909e391f1
Packages that support desktop need to install in projects that use
packages.config, so we should not rely on RID-specific assets for
desktop assets. Additionally, if some decides to use project.json and a
RID we need to make sure they still get the right desktop asset.
This change standardizes most of the desktop builds to specify both RID
and TFM. The common packaging targets will put the asset in both
lib/TFM and runtimes/RID/lib/TFM for desktop projects.
Commit migrated from https://github.com/dotnet/corefx/commit/0b7a2b6b4d1cf5f5a1fc2abc7e8c00c298bbe449
Several "mini-stress" tests that verify HttpClient doesn't completely fall over under some load:
- Use one HttpClient instance to make many requests serially and in parallel
- Use multiple HttpClient instances to make many requests serially and in parallel
- Ensure that HttpResponseMessages can be GCd even if the associated response hasn't been fully drained. This one fails right now on unix due to an open issue.
Commit migrated from https://github.com/dotnet/corefx/commit/4358712d3db870725a394478702e643018af52bf
* Force CurlHandler active operations to shutdown when handler disposed
If the CurlHandler is disposed of while active operations are in progress, fail them. This was generally already happening, but not reliably, and not with the right exception type (a cancellation exception).
Commit migrated from https://github.com/dotnet/corefx/commit/77cb6a2cddd973aeea08e0ceccb578603c1c1364
* Size CurlHandler's SendTransferState based on content length
libcurl will never request more than 16K at a time from a request content stream, so our transfer state object allocates a 16K buffer to use the first time data needs to be transferred. This size can be efficient in limiting the number of operations required in passing data around, but for small posts, it's an unnecessarily large size. This commit changes the code to inspect the request content length, and if it's known to be less than 16K, that size is used instead.
Commit migrated from https://github.com/dotnet/corefx/commit/3c362496e358a8097538d81cf8aa6f69bb5493cc
We weren't canceling the request when prematurely Dispose'ing the response stream. Because of how asynchronous transfers work, where we need to pause the connection until a reader has requested data, if no reader ever requested data (e.g. the stream was disposed without reading anything) then the connection could remain paused indefinitely, and it would sit around until the HttpClient timeout kicked in and canceled it. This could lead to unbounded growth of the number of sockets being used, as sockets couldn't be pooled or cleaned up due to still being associated with an active download. The fix is simply to cancel the request in Dispose if the request isn't already completed.
Commit migrated from https://github.com/dotnet/corefx/commit/c31660f8979e1bd16f969ac38a00d9ee35e9e51f
After further discussions, it's been decided we don't need to remove NTLM from the auth type list and do lots of gyrations to only allow it in specific circumstances. This commit simplifies the auth type handling as a result, putting NTLM back into the ordered list of auth types. A similar change will be made separately for Windows.
Commit migrated from https://github.com/dotnet/corefx/commit/1a10bb2bc2dfca668d1fa18c8f64e6f70b0f95d0