Commit Graph
464 Commits
Author SHA1 Message Date
Stephen Toub 82b3d61015 Merge pull request dotnet/corefx#8006 from stephentoub/http_stress
Add several HttpClient mini-stress tests

Commit migrated from https://github.com/dotnet/corefx/commit/5788aa4da2b6bc6ba798ac877c5d729cc866f32f
2016-04-24 11:31:01 -04:00
stephentoub 016a8bda35 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/13b80c9fba1d358ad65519984b36b6b0a017c19e
2016-04-23 11:10:35 -04:00
James Ko 5b922fa73d Avoid a closure allocation in MessageProcessingHandler (dotnet/corefx#7788)
* Avoid a closure allocation in MessageProcessingHandler

* Respond to PR feedback: Introduce SendState private class

* Respond to PR feedback, dotnet/corefx#2

* public -> internal in SendState

* SendState -> var


Commit migrated from https://github.com/dotnet/corefx/commit/e84f1a129aedae275fd6757c5fa50d52ceb6c145
2016-04-23 05:25:22 -07:00
stephentoub 6c4c36cd4d Add several outerloop HttpClient tests
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
2016-04-22 18:22:41 -04:00
Stephen Toub 093d6fe0e8 Merge pull request dotnet/corefx#7947 from stephentoub/cleanup_activeops
* 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
2016-04-22 09:54:52 -04:00
James Ko 47d83351a2 Avoid string.Split allocations in ContentDispositionHeaderValue (dotnet/corefx#7468)
* Avoid string.Split allocations in ContentDispositionHeaderValue
* Add tests for changes in ContentDispositionHeaderValue

Commit migrated from https://github.com/dotnet/corefx/commit/5bb608835c278482259bff96ac86160bc1a519af
2016-04-22 08:02:21 -04:00
stephentoub 7cd1a67b79 Address PR feedback
Removed exception used mainly for control flow.


Commit migrated from https://github.com/dotnet/corefx/commit/762588cbf39895a7a6f85d301384c6df5f736e2c
2016-04-22 07:50:59 -04:00
stephentoub 65eda03d5a 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/f456d9d60dfec1cd7ff53c1ae5652bf1d76bd02c
2016-04-22 07:16:44 -04:00
dotnet-bot facf18bbf5 Updating CoreFX dependencies to rc3-24022-00
Commit migrated from https://github.com/dotnet/corefx/commit/5bfcca66e5c16c3c1585d1087acd2ea522eb17a7
2016-04-22 05:37:54 +00:00
Stephen Toub ab36076fa6 Size CurlHandler's SendTransferState based on content length (dotnet/corefx#7922)
* 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
2016-04-21 15:32:52 -04:00
Stephen Toub c62bf87fdd Merge pull request dotnet/corefx#7946 from stephentoub/dispose_curlresponsestream
Fix CurlResponseStream.Dispose to cancel the request

Commit migrated from https://github.com/dotnet/corefx/commit/54f01a59a632ddf1bedbe30f412ce2cd53c35d62
2016-04-21 14:43:02 -04:00
Davis Goodin a7bcdba80c Merge pull request dotnet/corefx#7931 from dagood/fix-package-dependencies
Change non-existent package dependencies to actual versions

Commit migrated from https://github.com/dotnet/corefx/commit/06e1f406147f768f83f3607f4f87066ee796eac9
2016-04-21 09:51:35 -05:00
Stephen Toub e51d35ef2d Revert "Updating CoreFX dependencies to rc3-24021-00"
Commit migrated from https://github.com/dotnet/corefx/commit/019f436a0e66a807a7fefcc24095c5e158033bf8
2016-04-21 10:31:37 -04:00
Stephen Toub 31d1bfe713 Merge pull request dotnet/corefx#7945 from dotnet-bot/UpdateDependencies20160421053438
Updating CoreFX dependencies to rc3-24021-00

Commit migrated from https://github.com/dotnet/corefx/commit/dc2c8843e15b0ca4bc5b971314e524621559bcd4
2016-04-21 09:50:19 -04:00
Eric StJohn b0d4bb6911 Merge pull request dotnet/corefx#7929 from ericstj/httpClientNetCore50
Fix HttpClient package for NETCore50

Commit migrated from https://github.com/dotnet/corefx/commit/3799694db78dccbbd2389368583a0c98ffdc7abb
2016-04-21 06:33:53 -07:00
stephentoub d71713c5d0 Fix CurlResponseStream.Dispose to cancel the request
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
2016-04-21 06:54:53 -04:00
dotnet-bot c7c632b514 Updating CoreFX dependencies to rc3-24021-00
Commit migrated from https://github.com/dotnet/corefx/commit/5cc2c6a3ce0d0a38fb6f8149bbfae16929f3cd00
2016-04-21 05:34:38 +00:00
Stephen Toub 43b008c838 Merge pull request dotnet/corefx#7923 from stephentoub/simplify_ntlm
Simplify CurlHandler auth type handling

Commit migrated from https://github.com/dotnet/corefx/commit/aa1d73b89b80db62e65a7830b117d3b640cfcb49
2016-04-20 16:09:32 -04:00
Eric Eilebrecht 05b00b4f54 Merge pull request dotnet/corefx#7898 from ericeil/TODOcomments
Associate issues with more TODO comments in System.Net

Commit migrated from https://github.com/dotnet/corefx/commit/0f0a4bcc03db4bc709e100b2107d241f826dd1bb
2016-04-20 12:09:17 -07:00
Davis Goodin 5be2da2fc2 Change non-existent package dependencies to actual versions.
Commit migrated from https://github.com/dotnet/corefx/commit/28f021d9f269ea8207ede73d56b3cd99c8e19c96
2016-04-20 14:06:56 -05:00
Eric St. John 577e4781a1 Fix HttpClient package for NETCore50
Recent refactoring broke asset selection for HttpClient on NETCore50.

I had removed PackageTargetRuntime in order to use PackageDestination
instead but this caused the RID-specific implementation to be chosen for
NETCore50:
https://github.com/ericstj/corefx/commit/dotnet/corefx@0a8c4fb115246f80bcc86ddb88797bfd1c7271f7#diff-d6c266b4814b075db300e51936fdf722L17

Instead we need to make sure that we package the NETCore50 build
as RID-specific as well so that it can take precedence of the RID-
specific NETStandard implementation.


Commit migrated from https://github.com/dotnet/corefx/commit/e48bd673d51aecaa0c280e692dd6798866f75d41
2016-04-20 11:59:14 -07:00
Lakshmi Priya c50fee11cb Merge pull request dotnet/corefx#7911 from Priya91/updatexunitextensions
Update xunit.netcore.extensions version.

Commit migrated from https://github.com/dotnet/corefx/commit/bf3abb2df34fc890b1bf8b678636b711aaf131a9
2016-04-20 11:21:34 -07:00
Eric Eilebrecht 72de5bd512 Reference dotnet/corefx#7885 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/44022e8ff95ea068180a3a9583dc46bc7193f872
2016-04-20 10:05:53 -07:00
Eric Eilebrecht b50c8321c4 Use [TheoryAttribute] instead of manual looping over data.
Commit migrated from https://github.com/dotnet/corefx/commit/b50b076eb73ad53a5a3a84017a8e581ad5a964c8
2016-04-20 10:05:38 -07:00
Eric Eilebrecht 13d2049dc6 Remove TODO comment
Timeouts like these aren't uncommon in the System.Net test code.


Commit migrated from https://github.com/dotnet/corefx/commit/fd2fa174bb59b768f63225fde5bdde31c97313e4
2016-04-20 10:05:35 -07:00
Eric Eilebrecht 3bd2cecc8d Replace TODO with more relevant TODO referencing dotnet/corefx#2383
This matches the similar comment elsewhere in this file.


Commit migrated from https://github.com/dotnet/corefx/commit/fb891c4df14a0224e4b8cedb99c68e26ed05c855
2016-04-20 10:05:34 -07:00
Eric Eilebrecht c2b9568fe3 reference dotnet/corefx#7884 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/e790d7ccb4aab6a170fd2a8a181cf4b3181d68c5
2016-04-20 10:05:33 -07:00
Eric Eilebrecht 8d478ce19e Reference dotnet/corefx#5525 from TODO comments
Commit migrated from https://github.com/dotnet/corefx/commit/77eec5c96548a09b38a5ce59b1e110a765b02569
2016-04-20 10:03:40 -07:00
Eric Eilebrecht d1fa125555 Reference dotnet/corefx#7879 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/7539d1c29250dc84c4d523476fb47d9aa98e18e1
2016-04-20 10:03:36 -07:00
Eric Eilebrecht ad428054f8 Reference dotnet/corefx#5715 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/90eed038d74ea4d04ff0cf0803bdc3f2009252c6
2016-04-20 10:03:35 -07:00
Eric Eilebrecht a35a6ec67c Reference dotnet/corefx#7878 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/9bcfa48fb51620287e65b40d8c1f31a540605bd7
2016-04-20 10:03:33 -07:00
Eric Eilebrecht 7a387e79fa Reference dotnet/corefx#7877 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/48ebd92b72f1cdfa1322fcd2ddde41339f0fccf9
2016-04-20 10:03:32 -07:00
Eric Eilebrecht 7b38dcc9b2 Remove "TODO" from some comments
These are not actionable, but rather are just implementation notes.


Commit migrated from https://github.com/dotnet/corefx/commit/df5bc978c651d8a1130b7b59a26408320c4b7325
2016-04-20 10:03:00 -07:00
Eric Eilebrecht 1fd51f11d8 Reference dotnet/corefx#7856 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/9cd0bbb42551db664d006730df1426e39df2ee05
2016-04-20 10:02:57 -07:00
stephentoub e0299fbb00 Simplify CurlHandler auth type handling
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
2016-04-20 12:34:16 -04:00
stephentoub 67f0b405fa Delete ConnectTimeout TODO from CurlHandler
Either this property will be exposed and the value will remain infinite, or the property won't be exposed and this won't matter (hopefully the former).  Regardless, the TODO is now stale.  Removing.


Commit migrated from https://github.com/dotnet/corefx/commit/7ec27af0d28bb30da8008482fe50fdb0b128f19d
2016-04-20 00:29:01 -04:00
Lakshmi Priya Sekar 74c34921f1 Update xunit.netcore.extensions version.
Commit migrated from https://github.com/dotnet/corefx/commit/2134c046fa998522aa60159a2516b2f6bd7cc330
2016-04-19 19:16:41 -07:00
dotnet-bot cdbab74187 Updating CoreFX dependencies to rc3-24018-00
Commit migrated from https://github.com/dotnet/corefx/commit/b2e960386a786002b5cb724e64814dbb90eb4af4
2016-04-18 17:40:51 +00:00
David Shulman 28e1f8bf95 Merge pull request dotnet/corefx#7747 from StephenBonikowsky/patch-2
Find test builds files deeper in file structure.

Commit migrated from https://github.com/dotnet/corefx/commit/0d33c8cc3d5a730b2508e294b209fa666dc6cf55
2016-04-15 14:49:34 -07:00
Eric StJohn b64b9e224b Merge pull request dotnet/corefx#7772 from ericstj/harvestInternalPackageDeps
Harvest internal package deps

Commit migrated from https://github.com/dotnet/corefx/commit/f90ee43bb5b0e7b48b5d88a096747901cfc52ea9
2016-04-15 08:59:15 -07:00
Eric St. John abef5ac8e4 Remove internal project package references
These are no longer needed with the latest buildtools.  They'll be
harvested just like other dependencies.


Commit migrated from https://github.com/dotnet/corefx/commit/3a9ce15074ced337f75419aa88a263e6cb325b5f
2016-04-15 07:05:02 -07:00
dotnet-bot 03fd4d1c42 Updating CoreFX dependencies to rc3-24015-00
Commit migrated from https://github.com/dotnet/corefx/commit/a70774dac4088849551525d3ddd750d4e0cc4fbc
2016-04-15 06:40:27 +00:00
Stephen Bonikowsky ecd4e3032a Find test builds files deeper in file structure.
*

 In WCF repo many of our test projects are more than one level below the 'tests' directory.

*
If this doesn't break anything in corefx could we take this change?

* Amending to remove corefx\src\System.Net.Sockets\tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.builds

* Amending again with more test .builds files that needed to be removed.


Commit migrated from https://github.com/dotnet/corefx/commit/8cac0d4afab96e15837818ca1abfbd9068008458
2016-04-14 18:20:32 -07:00
David Shulman 5d5c5fb77d Add Http redirect tests
Now that the Azure test endpoint has been updated, we can add more redirect tests that use different redirect status codes.

It isn't necessary to modify every existing test to use different codes. But I modified the important ones especially those using credentials.

Fixes dotnet/corefx#7505


Commit migrated from https://github.com/dotnet/corefx/commit/507901ff79c58c81853dd33f511921019ac62f04
2016-04-14 14:58:07 -07:00
dotnet-bot 875bffd0a5 Updating CoreFX dependencies to rc3-24014-01
Commit migrated from https://github.com/dotnet/corefx/commit/0c97843892b744f01ef65a5684a911f50a38ed93
2016-04-14 06:39:49 +00:00
Eric St. John 69f5754740 Fix HttpClient dependencies on desktop
The latest changes to make HttpClient an OOB implementation on desktop
were not getting the correct dependency set.  This has to do with the
the way that EnsureOOBFrameworks evaluates assets to duplicate.  It does
so by seeing if any placeholders are obscuring the netstandard asset and
copying the netstandard asset if that is the case.  This worked fine for
the reference assembly, but not the implementation since it wasn't
actually obscured.  The result was that NuGet selects the correct
assets, but is missing implementation dependencies.

For now I'm fixing this by changing the package structure to explicitly
break out the net46 implementations into their own folders.  This is
essentially what we were trying to make happen automatically with
EnsureOOBFrameworks.

Longer term we might want to refactor how we generate dependencies
to do an actual nuget-asset selection in order to harvest from the
actual assemblies that NuGet will choose.

For now I'm also working around the problem that the unix shims are
being referenced everywhere even though they're only needed for Unix.

There's still a problem with this package in that we have two different
netstandard dependency groups (one meant for Windows and one meant for
Unix) but because we can't express that in a fat package the Unix one
will win, even on a windows machine, if the target framework supports
NETStandard1.4 or higher.  This doesn't cause a problem at the moment
because the unix implementation is using a superset of the Windows
dependencies but we need to see about how to better handle
in lieu of the NuGet feature for RID-specific dependencies.


Commit migrated from https://github.com/dotnet/corefx/commit/0a8c4fb115246f80bcc86ddb88797bfd1c7271f7
2016-04-13 13:32:47 -07:00
David Shulman dbbd669af6 Initial System.Net.Http 4.1 contract
To support important customer scenarios for CoreFx RTM, we will be updating the System.Net.Http contract from 4.0 to 4.1. We are focusing on HttpClientHandler enhancements.

We will be submitting the final proposed list of additions as part of issue dotnet/corefx#7623. As part of updating the contract to 4.1, we are also OOB'ing the Desktop (net46 Windows) implementation so that the package won't be a facade over Desktop but rather a full implementation. This is possible since System.Net.Http has always been a standalone dll in the .NET Framework. As part of this, we are changing the implementation for Desktop from the legacy HttpWebRequest sockets stack to the WinHttpHandler stack based on native WinHTTP. This will give us a good path forward as WinHttpHandler stack will be getting HTTP/2.0 support with newer versions of Windows 10.

This initial PR has a few API additions that we are definitely going to be adding. It's important to get these changes into the builds so that we can fully bake the OOB Http.dll assembly on all the platforms and continue package testing.

There is an existing System.Net.Http.WebRequestHandler class in the .NET Framework located in System.Net.Http.WebRequest.dll. This class is a subclass of HttpClientHandler. Due to this, we are being careful not to cause collisions with some of these added properties. WebRequestHandler has a 'ClientCertificates' property and a 'ServerCertificateValidationCallback' property. So, we are aligning/renaming the properties as we add them to HttpClientHandler OOB assembly. This may get altered slightly as we finalize the 4.1 System.Net.Http API.


Commit migrated from https://github.com/dotnet/corefx/commit/97c940eec1f6afe3e4af31e72d79c3a11e7b1ff1
2016-04-13 09:50:34 -07:00
Eric StJohn f0dd5a436b Merge pull request dotnet/corefx#7665 from ericstj/pcl-inbox
Add support for PCL profiles

Commit migrated from https://github.com/dotnet/corefx/commit/fdae434e8a639fdd0227068f6469c116146d9b44
2016-04-13 06:36:33 -07:00
dotnet-bot ea45391f54 Updating CoreFX dependencies to rc3-24013-00
Commit migrated from https://github.com/dotnet/corefx/commit/32d2d84ff16efa0ed04dd2780c62db36bbf0bf01
2016-04-13 06:13:25 +00:00
Eric St. John 608e8a43cd Add support for PCL profiles
Adds support for profile-based PCL using placeholders.


Commit migrated from https://github.com/dotnet/corefx/commit/5853b8f459c5b07d543274cd16137375970356ae
2016-04-12 14:49:26 -07:00