Commit Graph
473 Commits
Author SHA1 Message Date
stephentoub a2977e9fad More HttpClient test fixes and additions
- The GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead test has been failing with some regularity in CI, with strange GatewayTimeout errors.  I don't know why this particular test is so much more susceptible to that, but I've changed the test to use a local loopback server rather than an external site.

- The SendAsync_ReadFromSlowStreamingServer_PartialDataReturned test was relying on timings from the server that might not always be correct, and due to internal differences between curl and WinHttp were very frequently wrong on Unix such that the test was disabled there.  I reimplemented it with a local loopback server, too.

- I've added another mini-stress test, with posts instead of gets.


Commit migrated from https://github.com/dotnet/corefx/commit/9b6a0224c3e404afe3f2c58dfb59e2068391c879
2016-04-27 13:44:35 -04:00
Stephen Toub bd529e5af9 Merge pull request dotnet/corefx#8082 from stephentoub/curlhandler_finalization
Enable finalization of resources in CurlHandler

Commit migrated from https://github.com/dotnet/corefx/commit/f55dbdb64d28ab231401b906c7bb6f411b045d4e
2016-04-26 21:36:15 -04:00
Eric St. John b1119fb4ef Cleanup usage of Linux/OSX
We've standardized on using Unix in most cases where we only cross-
compile once for Unix.  This change cleans up mentions of Linux/OSX when
we aren't actually cross-compiling for those OSes.

The remaining projects that still cross-compile for Linux/OSX are:
  System.Diagnostics.Process
  System.IO.FileSystem.Watcher
  System.Net.NetworkInformation

The System.Net.Security functional tests seem to still have a distinct
difference in functional behavior on OSX so I have also left these
configured to cross-compile for Linux/OSX.


Commit migrated from https://github.com/dotnet/corefx/commit/16ee317fa4e194ff7cf61e923caf103909e391f1
2016-04-26 14:37:21 -07:00
Eric St. John 54f18d06f2 Eliminate use of PackageTargetRuntime in CSPROJ
PackageTargetRuntime can now be derived from the OSGroup of the project.
Set the default values in dir.props and only override if necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/7f871515097039b95b70c974eb5947fe7afaa322
2016-04-26 12:39:49 -07:00
Eric St. John a27cef15c7 Make desktop assets resolve without RID
Packages that support desktop need to install in projects that use
packages.config, so we should not rely on RID-specific assets for
desktop assets.  Additionally, if some decides to use project.json and a
RID we need to make sure they still get the right desktop asset.

This change standardizes most of the desktop builds to specify both RID
and TFM.  The common packaging targets will put the asset in both
lib/TFM and runtimes/RID/lib/TFM for desktop projects.


Commit migrated from https://github.com/dotnet/corefx/commit/0b7a2b6b4d1cf5f5a1fc2abc7e8c00c298bbe449
2016-04-26 12:39:48 -07:00
stephentoub 36da57bb6d Enable finalization of CurlHandler requests
Refactorings and changes to object lifetimes to enable a dropped HttpResponseMessage to clean up associated state rather than potentially leaking it for the duration of the HttpClient's lifetime.


Commit migrated from https://github.com/dotnet/corefx/commit/24332fa8691abb7541503a2b44dd228eb5b839af
2016-04-26 10:42:04 -04:00
stephentoub b12f72bd7d Add more HttpClient stress tests
Commit migrated from https://github.com/dotnet/corefx/commit/1482013de9fa08e5834d92ce2884c194f93662fb
2016-04-26 10:41:41 -04:00
dotnet-bot 40d3f889c2 Updating CoreFX dependencies to rc3-24026-00
Commit migrated from https://github.com/dotnet/corefx/commit/b2704ed517b846992ffd66806d54ffdf4cb62526
2016-04-26 05:41:52 +00:00
Davis Goodin d8d35cf32b Validate that the results of a restore are exactly what was requested.
Also update buildtools to fix UpdatePackageDependencyVersion and fix dependencies on packages that had a minor version bump.


Commit migrated from https://github.com/dotnet/corefx/commit/11cafd348f9e0606e55ac5210de0d8847926dbfe
2016-04-25 11:42:47 -05:00
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