Commit Graph
32 Commits
Author SHA1 Message Date
Eric Mellino 219af47e0c Update test dependencies
Fixes all test warnings about 'different versions of the same dependent
assembly'


Commit migrated from https://github.com/dotnet/corefx/commit/b84f53f744ba0418255cbe471b783dde2a700a8e
2015-08-03 13:44:34 -07:00
Eric Mellino c0015fc582 Move all tests to latest xunit beta
Commit migrated from https://github.com/dotnet/corefx/commit/7c12b0120834f92d5c591124f692ea1b64c6a877
2015-08-03 11:27:48 -07:00
ericstj a419b9c68f Move System.Net tests back to pre-release versions temporarily to fix missing SecureString
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
2015-08-02 09:49:36 -07:00
Eric St. John 47aaf9fcf8 Use stable package dependencies and move our packages to post-stable versions
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
2015-07-31 15:47:51 -07:00
David Shulman e2fd9f8a40 Merge pull request dotnet/corefx#2553 from davidsh/httpmethod_regression
Fix regression in HttpMethod.GetHashCode()

Commit migrated from https://github.com/dotnet/corefx/commit/50ba7141c650bdd52ce33e8b497519e6129466bb
2015-07-29 13:32:15 -07:00
David Shulman 7088d15fec Fix regression in HttpMethod.GetHashCode()
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
2015-07-29 09:40:13 -07:00
Vijay Kota a660b68ac7 Initial xplat work for HttpClient
Commit migrated from https://github.com/dotnet/corefx/commit/ac4bf3eb90bf9255e64031c3d623b3443f349f7f
2015-07-28 10:45:08 +05:30
David Shulman 19301dfcd2 Merge pull request dotnet/corefx#2534 from justinvp/http_streamtostreamcopy
Make StreamToStreamCopy static

Commit migrated from https://github.com/dotnet/corefx/commit/196c8368b08b813bd768785a91e030ecc0be3f4f
2015-07-27 09:59:45 -07:00
Justin Van Patten b9fa8d30e2 Make StreamToStreamCopy static
Avoids the unnecessary allocation in StreamContent's
SerializeToStreamAsync.


Commit migrated from https://github.com/dotnet/corefx/commit/1bb48a7b5f89c6f3da297c3e91441b18da11a184
2015-07-25 13:35:25 -07:00
Justin Van Patten e098db56d0 Cleanup ByteArrayContent
- Use Task.FromResult instead of TaskCompletionSource
- Make readonly fields readonly
- Remove unused usings


Commit migrated from https://github.com/dotnet/corefx/commit/4874e78513d247478c08c85d791c3154eaa0d896
2015-07-25 11:47:40 -07:00
David Shulman f5e46293c1 Refactor WinHttpHandler tests for multiple test projects
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
2015-07-17 14:16:49 -07:00
dotnet-bot 6407d926bd Initial commit of System.Net.Requests
This change also contains some minor refactorings in
System.Net.{Http,WebHeaderCollection} in order to share some code between
the various System.Net assemblies.


Commit migrated from https://github.com/dotnet/corefx/commit/e5c85aae7b35a7178950a1a3b518262714c4fd64
2015-07-17 10:34:58 -07:00
dotnet-bot 82d561b50e Skip functional network tests on platforms where System.Net.Http library is not ported.
Commit migrated from https://github.com/dotnet/corefx/commit/c4814af0613cecad5bbf71fec1697600b27d6efc
2015-07-16 13:29:30 -07:00
dotnet-bot 6f05324ca8 Refactor Http tests for multiple test projects
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
2015-07-16 11:32:48 -07:00
stephentoub bdb3289cb3 Fix up Common links in System.Net.Http src and tests
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
2015-07-15 10:45:55 -04:00
Chad Nedzlek f6d0863a6d Update locks
Commit migrated from https://github.com/dotnet/corefx/commit/f9dd1c3d27d95ab7b6f805a63ad64a47972dfdfc
2015-07-10 14:53:21 -07:00
David Shulman 6ebc7e424e Merge pull request dotnet/corefx#2153 from Maxwe11/system.net.http-closure
Eliminate closure allocations in System.Net.Http

Commit migrated from https://github.com/dotnet/corefx/commit/eb7126435be5c7603690c79f8043cc7dcd0f6f5e
2015-07-09 14:22:25 -07:00
David Shulman 946476a75e Improve security of AutomaticRedirection options for HttpClientHandler/WinHttpHandler
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
2015-07-07 08:32:37 -07:00
Maxwe11 67371696df Eliminate closure allocations in System.Net.Http
Commit migrated from https://github.com/dotnet/corefx/commit/155dfa7d831ff5e3dd653d5b845e3c3ca14a3d56
2015-07-04 01:17:17 +03:00
David Shulman 274e8af0d9 Merge pull request dotnet/corefx#2149 from davidsh/winhttphandler
Initial open source WinHttpHandler

Commit migrated from https://github.com/dotnet/corefx/commit/45f21225e88a9959c93293c87a4348b333e572dd
2015-06-26 17:18:01 -07:00
dotnet-bot c07d246c4d Initial open source of WinHttpHandler
Commit migrated from https://github.com/dotnet/corefx/commit/bbe092e0d2edad89df1e4dfc2fb7cfdc4656f3a1
2015-06-26 16:09:07 -07:00
Nick Guerrera 4c28436d2e Update package dependency versions
Commit migrated from https://github.com/dotnet/corefx/commit/0c6b87e4e67e80b5d751bcd6883ca6e89fb68157
2015-06-24 14:04:15 -07:00
David Shulman c815caf6f2 Merge pull request dotnet/corefx#2139 from dotnet-bot/from-tfs
Merge changes from TFS

Commit migrated from https://github.com/dotnet/corefx/commit/25adee3ca74d2af65230456f7735f90fc13c679d
2015-06-23 17:50:55 -07:00
Matt Mitchell 9d11745057 Update build tools. Contains changes to support FreeBSD in xunit.
Float package versions to get the latest version of the netcore extensions (has FreeBSD support)


Commit migrated from https://github.com/dotnet/corefx/commit/c760824a531ffc3981148a8ef9b97f56af9ff643
2015-06-23 16:06:50 -07:00
David Shulman a406491c04 Remove unused WinHttpHandler.MaxRequestContentBufferSize property
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
2015-06-23 14:13:24 -07:00
Matt Mitchell ddfcf96e4d Fixes issues with the System.Net.Http tests
* Tests were not running because the directories were not named properly.
* Rename test project to match the correct name.
* Fix typo in resource strings.


Commit migrated from https://github.com/dotnet/corefx/commit/36b6d6bfffe8e4994820109636af96cb9e6f39cb
2015-06-23 08:58:52 -07:00
Eric StJohn 1a58e04134 Update corefx packages to version 23011
Commit migrated from https://github.com/dotnet/corefx/commit/3bb2f035a7c1f6168a6bd34fbf3851f7eedf76bf
2015-06-19 16:33:53 -07:00
Justin Van Patten 0e22273fe0 System.Net.Http: String.Compare -> String.Equals
Per the Best Practices for Using Strings at
http://msdn.microsoft.com/en-us/library/dd465121(v=vs.110).aspx

* Use an overload of the String.Equals method to test whether two
strings are equal.
* Use the String.Compare and String.CompareTo methods to sort strings,
not to check for equality.

Also, replaced String.ToLowerInvariant().GetHashCode() with
StringComparer.OrdinalIgnoreCase.GetHashCode().


Commit migrated from https://github.com/dotnet/corefx/commit/423d73e086533aefcd142d8aa17eb300d79435d6
2015-06-11 19:58:09 -07:00
stephentoub 68b0c18d2d Update all project.lock.json files
Used:
build.cmd /t:RestorePackage /p:LockDependencies=true


Commit migrated from https://github.com/dotnet/corefx/commit/76fcb7ab9444f68577ca0ec17055ca8c4e574b75
2015-06-10 10:19:11 -04:00
dotnet-bot d3436011d2 Add System.Net.Http unit tests
Commit migrated from https://github.com/dotnet/corefx/commit/ee18ab6acf4d08109baf627310242f1f05c4b912
2015-06-01 10:41:07 -07:00
David Shulman 3bcc855204 Set default value of HTTP protocol version in NETNative to HTTP 2.0 .
Since the underlying HTTP stack in NETNative (Windows.Web.Http) supports HTTP/2.0, we are changing the default value HttpRequestMessage.Version property to 2.0.  HTTP requests sent to servers that don't actually support HTTP/2.0 will result in the connection operating with HTTP/1.1.

[tfs-changeset: 1478638]


Commit migrated from https://github.com/dotnet/corefx/commit/7c551c4ff3cd312e60082f454660962932f53b7b
2015-05-28 14:31:54 -07:00
David Shulman 27b7e18793 Initial open sourcing of System.Net.Http code.
This first commit does not include buildable CSPROJ/SLN files yet nor tests.  Those will be coming soon.

[tfs-changeset: 1462281]


Commit migrated from https://github.com/dotnet/corefx/commit/38140d6082ef5d3bca44533495bef623701cdfda
2015-04-29 14:19:31 -07:00