Commit Graph
55 Commits
Author SHA1 Message Date
stephentoub ba8bda425b Merge remote-tracking branch 'upstream/master' into from-tfs
Conflicts:
	src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
	src/System.Threading.Tasks/tests/project.lock.json


Commit migrated from https://github.com/dotnet/corefx/commit/c99aa51bff90dda680eb24a16998e5c99e29ba94
2015-08-14 22:43:59 -04:00
Eric St. John d7a0ae297b Update corefx packages to latest
Commit migrated from https://github.com/dotnet/corefx/commit/23f0b695bd162e0f665427c95180dc21931e5c70
2015-08-14 15:43:23 -07:00
Eric St. John 24877d3ce7 Move System.Net tests up to latest pre-release version
This change undoes the workaround from https://github.com/dotnet/corefx/commit/dotnet/corefx@5d9f9d4c6ea450366c7b70af6e6006a401284d14#diff-53766f09e26c8b4b422d2946d05c83a6


Commit migrated from https://github.com/dotnet/corefx/commit/ccdf7bb4a2a87de13f8dba69ac7a0df3818c69b1
2015-08-14 10:21:53 -07:00
Hemanth Kapila 643c412a2a PR Comments
Following PR comments were addressed:
*. curl_version_info_data is defined till the required field
*. the fields were made readonly.


Commit migrated from https://github.com/dotnet/corefx/commit/8f52c16490967b7906800a46bdea546cbfb526e8
2015-08-14 21:40:42 +05:30
Hemanth Kapila 91e60241d2 Introducing checks for libcurl features
Runtime and load-time checks to ensure that the features user is relying
on are available in the libcurl library loaded


Commit migrated from https://github.com/dotnet/corefx/commit/20eea4848cac8d8075eacef6dec12b750ca790d2
2015-08-14 16:52:09 +05:30
Eric St. John 77309d4821 Update the version of all assemblies
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
2015-08-13 17:07:57 -07:00
Rajan Singh e80304b9a3 Enabled max redirection in HTTP xplat
modified:   ../../Common/src/Interop/Unix/libcurl/Interop.libcurl_types.cs
	modified:   System/Net/Http/Unix/CurlHandler.cs
	modified:   System/Net/Http/Unix/HttpClientHandler.Unix.cs


Commit migrated from https://github.com/dotnet/corefx/commit/868da12eee3983ad1fdf2031a99e68652b81addb
2015-08-13 21:45:28 +05:30
Rajan Singh 57f897f9e9 Incorporated comments
modified:   System/Net/Http/Unix/CurlHandler.cs
	modified:   System/Net/Http/Unix/HttpClientHandler.Unix.cs


Commit migrated from https://github.com/dotnet/corefx/commit/b2de38156bdd23e6cc3c3e5e40a30cac674475ca
2015-08-13 09:43:54 +05:30
Rajan Singh 81d1b7c09e Enabling cookie container in HTTP xplat
modified:   ../../Common/src/Interop/Unix/libcurl/Interop.libcurl_types.cs
	modified:   System/Net/Http/Unix/CurlHandler.cs
	modified:   System/Net/Http/Unix/HttpClientHandler.Unix.cs


Commit migrated from https://github.com/dotnet/corefx/commit/f79c1cd2a4c646b0434782c64f6de3a686b0bf38
2015-08-12 23:16:08 +05:30
Guillermo Rangel ff81931a13 Fixing CancellationToken not propagating properly and adding some Tests to verify it.
Addressing Feedback in GitHub

Renaming TestHandler to SendAsyncWinHttpMockHandler and adding missing spaces.

Added missing line in json file to use System.Runtime.InteropServices.RuntimeInformation.


Commit migrated from https://github.com/dotnet/corefx/commit/e76774df88b497107e8289fce314ea149abc7811
2015-08-11 13:58:39 -07:00
Vijay Kota b05f4378f9 HttpClient xplat: Add chunked mode support
Commit migrated from https://github.com/dotnet/corefx/commit/d3a3da65c8caf151adfd6db242676b0d6f275f35
2015-08-11 10:23:41 +05:30
Rajan Singh 0b27d483a6 Incorporated comments
modified:   System/Net/Http/Unix/CurlCallbacks.cs


Commit migrated from https://github.com/dotnet/corefx/commit/adfcc89dc3e4b59b0a615cfee3672ad5631751e3
2015-08-11 09:23:05 +05:30
Rajan Singh b29c787740 Incorporated Comments
modified:   System/Net/Http/Unix/CurlCallbacks.cs


Commit migrated from https://github.com/dotnet/corefx/commit/71bf1693fad49b2094a62d3afd69303977d4b977
2015-08-10 22:56:32 +05:30
Rajan Singh e24b5c3205 Fixing multi response header issue along with putting checks in http message parser
modified:   System/Net/Http/Unix/CurlCallbacks.cs


Commit migrated from https://github.com/dotnet/corefx/commit/1c126349c7614823131e09bc0cf78d7e5031865a
2015-08-10 17:12:07 +05:30
Vijay Kota 93bf847b92 HttpClient xplat: Basic request and response processing
- Also addressed some of the comments in https://github.com/dotnet/corefx/issues/2555


Commit migrated from https://github.com/dotnet/corefx/commit/3c24f2ce60a425e10ee903b7d252654dc399a175
2015-08-10 09:57:53 +05:30
Stephen Toub 7cbc620960 Merge pull request dotnet/corefx#2676 from dotnet-bot/from-tfs
Merge changes from TFS

Commit migrated from https://github.com/dotnet/corefx/commit/bd93302de81126297995adcd8b9cc16f82046ce9
2015-08-07 07:38:11 -04:00
David Shulman 7ccf0c26e2 Bug 1188675:Project N Bug: .NET HttpClient can't do Authenticated POSTs due to limitations of System.IO.NetFxToWinRtStreamAdapter
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
2015-08-06 20:53:35 -07:00
Hemanth Kapila 442793b080 Automatic Content Decompression
Modified CurlHandler to set the curl options for automatic content
decompression.


Commit migrated from https://github.com/dotnet/corefx/commit/18aec3452bb7b6dea2190151f4f9a26fb7876401
2015-08-07 08:52:32 +05:30
Vijay Kota 46aeb59c0e Fix HTTPS checks in xplat HttpClient
Commit migrated from https://github.com/dotnet/corefx/commit/6a05a612275e9a2fef2aaba5e153c3604077b573
2015-08-05 10:03:08 +05:30
Eric Mellino fd362c6941 Merge pull request dotnet/corefx#2609 from mellinoe/latest-xunit
Latest xUnit beta for all test projects

Commit migrated from https://github.com/dotnet/corefx/commit/4cda5aa5425a2d67e7ee498faf4cc7af480800e0
2015-08-04 14:41:44 -07:00
Stephen Toub 04031c4972 Merge pull request dotnet/corefx#2557 from kapilash/proxy
HttpClient via libcurl : proxy support

Commit migrated from https://github.com/dotnet/corefx/commit/fe4f468789621b3646c5280ab514b4426beca313
2015-08-04 09:53:05 -04:00
Hemanth Kapila c046538a09 HttpClient via libcurl : proxy support
This commit introduces integrates CURL handler with the proxy
functionality offered by libcurl


Commit migrated from https://github.com/dotnet/corefx/commit/71efecc937c9d44c7ea2fa79f21f416575ba6168
2015-08-04 09:06:32 +05:30
Eric Mellino 66969e748b Re-lock dependencies with latest xunit
Commit migrated from https://github.com/dotnet/corefx/commit/795cbc75f8e167047a7c19cd7e21e99b9b9f4308
2015-08-03 16:40:33 -07:00
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