- Fix Assert that was throwing in a background thread due to mistmatched type (it was looking explicitly for HttpResponseMessage rather than any type in its inheritance hierarchy, and CurlHandler uses a derived type).
- Update project.json package versions
- Unsubscribe the listener when done with it
Commit migrated from https://github.com/dotnet/corefx/commit/9a8d97852bcce9be0b4b6b5eff5ed87f4e36119e
Explicit static cctors cause the C# compiler to not mark types as beforefieldinit, which in turn means that the backend compiler needs to add checks to static methods to ensure that the type has been initialized. We have a bunch of such cctors across corefx that can be easily removed; this commit does so. In a few places, it also presizes some collections to help avoid unnecessary memory pressure.
Commit migrated from https://github.com/dotnet/corefx/commit/79ae21b1b9a113230da7ebfbffa4e3c3fe36f0ac
Some fixes (adding imports, adding Platforms package) were tooled, but more complex ones (forking project.jsons, editing csproj's) were not.
Also makes dependency version validation rules case-insensitive. (I used this fix to update the versions of some packages.)
[tfs-changeset: 1573868]
Commit migrated from https://github.com/dotnet/corefx/commit/84af04317505d48feaa1e83dd5dc27ddc0f6de76
The task from ReadAsync was never moving to a terminal state (i.e. "hanging") if the token was marked for cancellation after starting the task. The problem was that our task continuation wasn't being called if the token was cancelled before the continuation was scheduled.
The fix is to avoid passing in the token during the .ContinueWith call. Instead, the token is checked inside the continuation. This puts all the logic in the same place for checking the final status of the ReadAsync operation (which has multiple inner operations) including whether it should fault due to an error or have a successful completion.
Commit migrated from https://github.com/dotnet/corefx/commit/3ae96358a215023f3ecbba13fb4d860693f221c0
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.
This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.
Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.
Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.
Removed OutputType=Library property as it isn't necessary.
Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
WinHttpHandler was losing 'Set-Cookie' response headers during auto redirection handling when the handler was in 'manual cookie' mode. I.e. `CookieUsePolicy.UseSpecifiedCookieContainer`. This is the only mode that HttpClientHandler uses.
The 'Set-Cookie' headers were currently only parsed out when a final HTTP response happened. This meant that 'Set-Cookie' headers present in interim 3xx redirection responses as well as interim 401, 407 auth responses would not be stored into the CookieContainer. Hence, those same cookies could not be sent back to the server when needed.
The fix is to make sure we parse out the 'Set-Cookie' headers whenever we get an HTTP response back from WinHTTP. As part of this fix, I re-factored out the cookie handling code into a separate class. I also added specific WinHttpHandler tests for the two different cookie modes as well as a HttpClientHandler test to validate cross-platform (i.e. CurlHandler).
Address dotnet/corefx#4960 but further fixes are needed for *NIX as well.
Commit migrated from https://github.com/dotnet/corefx/commit/8ac944afcbd35d8b489e14e1c4c7f4be08f74c72
WinHttpHandler was currently ignoring the `HttpRequestMessage.Version`
property and was always sending out requests using 'HTTP/1.1' which is the
default for winhttp.
This fix now will look at the request message `Version` property and
send out the request using either 1.0 or 1.1. If neither of these
versions are specified, then the request is sent out using the default
winhttp version (which is currently 1.1 as of Windows 10).
Note: The .NET Framework (Desktop) will throw an exception if neither
1.0 nor 1.1 version is specified. Currently CoreFx including NETNative,
WinHttpHandler and CurlHandler will simply use a default instead of
throwing. While this is different behavior than Desktop, it is more
desirable in the long run.
There is a separate issue dotnet/corefx#4870 to add HTTP/2.0 support to WinHttpHandler.
Fixesdotnet/corefx#4754
Commit migrated from https://github.com/dotnet/corefx/commit/f48989bbe10dd4b24a9e3b085672c30b5251cda6