This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions. Assemblies with API differences
get a minor version bump. Assemblies with only bugfixes get a build version
bump.
In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.
[tfs-changeset: 1514419]
Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
This bug revolves around a design limitations of the System.Runtime.WindowsRuntime System.IO.NetFxToWinRtStreamAdapter. Due to the way that the adapter works, the Windows.Web.Http layer is unable to "rewind" data in order to re-send it to the server for POST requests. Resending request entity-body data to the server is frequently needed due to authentication challenges.
The nature of this bug has resulted in a few common scenarios being broken for UWP (Windows 10 Store) apps that use System.Net.HttpClient or System.Net.HttpWebRequest. Even for simple content like StringContent (which is already buffered and not a stream, per se), we are unable to POST the data since the code paths were always using the limited NetFxToWinRtStreamAdapter.
The fix for this bug is multi-layered. In general, we try to avoid using the NetFxToWinRtStreamAdapter for the POST scenarios. For content that is ByteArrayContent (or derived classes), the data is already "buffered". So, we don't need to send it as a stream. We also check if the data has been buffered via the developer calling LoadIntoBufferAsync() explicitly and send it as a buffer. Then, if the data is not buffered, we check the stream itself. If it already supports the WinRT Stream interfaces, then we don't need to use the adapter. So, third-party devs can create compatible, multi-interface (.NET and WinRT) stream content to be POSTed.
[tfs-changeset: 1511754]
Commit migrated from https://github.com/dotnet/corefx/commit/e298b31e1da3dea3c3fd78f5f713b4659136484e
The stable versioned packages use an older codebase currently than the latest pre-release.
That codebase is still using SecureString in System.Private.Networking, but the dependency
was omitted since crypto is still pre-release but networking had to be marked stable for UWP.
This missing dependency was causing tests to fail.
Rather than just list the dependency I am moving these tests back to pre-release packages
for the System.Net contracts, since System.Net packages are under active development
it is better to have the tests running against latest than the stable bits.
Once we have newer versions published we'll update these tests to use those.
Commit migrated from https://github.com/dotnet/corefx/commit/5d9f9d4c6ea450366c7b70af6e6006a401284d14
This change modifies the build to consume the stable version where available.
This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).
I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.
[tfs-changeset: 1508664]
Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
A PR from last month changed how GetHashCode() works. This ended up
breaking tests against the .NET Native build of System.Net.Http which
shares the same source code as CoreFx. So, reverting the change in
GetHashCode() and porting additional ToF tests to GitHub.
Commit migrated from https://github.com/dotnet/corefx/commit/2dcf6471f00954b86663f26f5ce45d8c3485017b
This change sets up the layout for having multiple test projects for
WinHttpHandler. It follows the current guidlines as well as working
within the BUILDTOOLS requirements of having ".Tests.csproj" for the
names of the projects.
Also, fixed up some cross-platform definitions in the solutions files
for Http and WinHttpHandler.
After this PR is done, we will be migrating a large set of http
functional tests to GitHub
Commit migrated from https://github.com/dotnet/corefx/commit/42d81c41175ab8832032a2a387b8dc58365604a9
This change sets up the layout for having multiple test projects for Http. It follows the current guidlines as well as working within the BUILDTOOLS requirements of having ".Tests.csproj" for the names of the projects.
Commit migrated from https://github.com/dotnet/corefx/commit/e7b68608db14327ec55fc90c0f5aee3ed72fab36
An include for a Common file was using ..\..\Common instead of $(CommonPath). Another had a link but not under Common. And in the test project, all of the production code files were also being flattened into a single ProductionCode folder.
Commit migrated from https://github.com/dotnet/corefx/commit/3df107322881298bacafe36704a6b0d96ea86755
As per the latest security review, this issue captures the following tasks in order to remove insecure automatic redirection of HTTPS -> HTTP in HttpClientHandler/WinHttpHandler. This will also match the current NETCore/NETNative behavior as well.
In general, the security guidance is to remove insecure patterns from new code/platforms. This helps the entire ecosystem become more secure while balancing the needs of app-compat.
1. Change the WinHttpHandler API surface to remove the AutomaticRedirectionPolicy enum 3-state value.
2. Change the name/type of the 'AutomaticRedirectionPolicy' property to 'bool AutomaticRedirection'. This matches the current Framework Design guidelines of fully spelling out words and the word pattern of the 'AutomaticDecompression' property.
3. The default for the AutomaticRedirection property will be true. This value means that all redirects will be followed automatically EXCEPT for https:// to http://. This behavior is different from .NET desktop where https:// to http:// redirects are also followed.
[tfs-changeset: 1498199]
Commit migrated from https://github.com/dotnet/corefx/commit/4c99b29d6718af2de6d5e53869c694054cae161b
This property has been effectively deprecated. It was left unimplemented in WinHttpHandler until we realized that we should remove it from the public WinHttpHandler contract.
In the .NET Desktop, the equivalent HttpClientHandler.MaxRequestContentBufferSize property was only used when the handler needed to automatically buffer the request content. That only happened if neither 'Content-Length' nor 'Transfer-Encoding: chunked' request headers were specified. The advice to developers is to always be precise with the headers and explicitly choose the transfer mechanism. So, this condition is an edge case.
When left ambiguous, the handler thus needed to buffer in the request content to determine its length and then would choose 'Content-Length' semantics when POST'ing.
In CoreCLR and .NETNative, the handler will resolve the ambiguity by always choosing 'Transfer-Encoding: chunked'. The handler will never automatically buffer in the request content.
[tfs-changeset: 1492780]
Commit migrated from https://github.com/dotnet/corefx/commit/1183c8183fb25c6f577e91c72bdcd0036fd2ef05