Commit Graph
2145 Commits
Author SHA1 Message Date
Stephen Toub bf9054c38c Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6
2019-07-25 10:45:20 +02:00
Ahson Khan c59af1de67 Auto-generate the reference assemblies to normalize them (dotnet/corefx#39681)
* Update Microsoft.VisualBasic.Core ref

* Update System.Collections.Concurrent ref

* Update System.Collections.Immutable ref

* Update System.Collections ref

* Update System.ComponentModel.Composition ref

* Update System.Data.Common ref

* Update System.Data.OleDb ref

* Update System.Data.SqlClient ref for netcoreapp

* Update System.Diagnostics.DiagnosticSource ref and DiagnosticSourceActivity.cs

* Update System.IO.Packaging ref for netcoreapp

* Update System.IO.Pipelines ref

* Update System.Linq ref

* Update System.Net.Http ref

* Update System.Net.Security ref

* Update System.Numerics.Tensors ref

* Update System.Reflection.Emit for netcore

* Update System.Security.AccessControl ref

* Update System.Security.Permissions ref

* Update System.ServiceModel.Syndication ref

* Update System.Text.Encodings.Web ref

* Update System.Threading.Channels ref for netcoreapp

* Update System.Utf8String.Experimental ref

* Update System.Utf8String.Experimental csproj to reference new file.

* Upat eSystem.Runtime ref and Manual ref

* Update Microsoft.Bcl.AsyncInterfaces ref

* Disable warning CS8617 for missing nullability annotations within
explicit interface methods.

* Revert System.Runtime.cs back to what's in master.

* Update System.Runtime ref (single change - System.Char -> char).

* Revert System.Collections.Immutable back to what's in master (keep
readonly on private fields).

* Update System.Runtime ref and add comment in Manual ref file for
TypedReference.


Commit migrated from https://github.com/dotnet/corefx/commit/bdd0814360d4c3a58860919f292a306242f27da1
2019-07-25 03:44:48 +00:00
Geoff Kizer 24ee76b516 Merge pull request dotnet/corefx#39638 from geoffkizer/streamshutdownfixes4
HTTP2: Rework shutdown handling

Commit migrated from https://github.com/dotnet/corefx/commit/ca3fe6738ae6afc56e1f8fb5477a57a8dc2e183c
2019-07-24 02:28:18 -07:00
Geoff Kizer 1e37ef09c1 address review feedback and fix test issue
Commit migrated from https://github.com/dotnet/corefx/commit/d6e6f52c928f56b424b08fcf6e08ea84a74748ab
2019-07-24 00:47:35 -07:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
Geoff Kizer 5ab9a06717 fix race in request body completion
Commit migrated from https://github.com/dotnet/corefx/commit/29328b71b65abe3a199f0daf62f6ee71ca916e78
2019-07-23 13:19:35 -07:00
Geoff Kizer 439a7e2fc1 fix race with _requestBodyCancellationSource creation
Commit migrated from https://github.com/dotnet/corefx/commit/7394185c0fc8a52bebf384b933b07c1eb1fba360
2019-07-23 13:19:35 -07:00
Geoff Kizer 501a729169 rework SendHeadersAsync to address various issues
Commit migrated from https://github.com/dotnet/corefx/commit/2d5a9555d4888c82c653a9d7ad8368bc94adfdf2
2019-07-23 13:08:20 -07:00
Geoff Kizer 7390bf5db9 address review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/752c1c8d8a01d22d52b1a320f9ed082049494045
2019-07-23 13:08:20 -07:00
Geoff Kizer 918413eb1d combine into single Cancel method on stream, and ensure Dispose cancels properly when response is not read to end
Commit migrated from https://github.com/dotnet/corefx/commit/5973d1ee6f3b616d2af2bc80527bdf8fe76ee210
2019-07-23 13:08:19 -07:00
Geoff Kizer 78f173fae4 rework shutdown handling
Commit migrated from https://github.com/dotnet/corefx/commit/0cd73b77e1f31d48037b56deb0206f4e56b4232e
2019-07-23 13:08:19 -07:00
Stephen Toub 47f8f6d47d Re-enable xunit warning 2003 (dotnet/corefx#39696)
* Replace "Assert.Equal(null, " with "Assert.Null("

* Replace "Assert.NotEqual(null, " with "Assert.NotNull("

* Replace "Assert.Same(null, " with "Assert.Null("

* Replace "Assert.StrictEqual(null, " with "Assert.Null("


Commit migrated from https://github.com/dotnet/corefx/commit/6de660a02e335eefebfcc3c81ecb0013e2a8148e
2019-07-23 15:49:33 -04:00
Stephen Toub fe4dd62491 Disable SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet/corefx#39692)
Commit migrated from https://github.com/dotnet/corefx/commit/687f36489c19072cd5a19d48c099f53bbc871c4d
2019-07-23 09:09:51 -04:00
Stephen Toub c36edeac9b Re-enable ~20 xunit analyzers (dotnet/corefx#39671)
* Re-enable ~20 xunit analyzers

All but one of these had no associated warnings firing.  I fixed one warning to be able to re-enable another analyzer.

* Fix netfx build failures


Commit migrated from https://github.com/dotnet/corefx/commit/c60b8172cfcd1e7f0d8104872f279781fd288b68
2019-07-22 16:45:03 -04:00
Stephen Toub 959dc0b302 Pass CancellationToken from Http2Connection.SendHeadersAsync to StartWriteAsync (dotnet/corefx#39635)
Commit migrated from https://github.com/dotnet/corefx/commit/9597dadcea747960aba304253370a17a2218208d
2019-07-20 20:47:17 -04:00
Stephen Toub 371bcac4d5 Re-enable unicode host name test (dotnet/corefx#39606)
Site appears to be back up.

Commit migrated from https://github.com/dotnet/corefx/commit/1303d28179b4369cbfac43affd723fa6e0bc9554
2019-07-19 10:08:42 -04:00
Stephen Toub f9b59811ee Avoid "async void" tests (dotnet/corefx#39613)
Most of these are just because "async void" tests are rare and require special handling in xunit we needn't use.  But a few of these are plain wrong and were resulting in our not actually testing what we hoped to test.

Commit migrated from https://github.com/dotnet/corefx/commit/50d8c71bb6139f3c06dd820d6d757a095a9fe994
2019-07-19 10:07:15 -04:00
Stephen Toub d52a171d83 Change HttpStress app to highlight in red unchanged totals (dotnet/corefx#39576)
When no additional operations have completed since the last time status was output, highlight that in red.

Commit migrated from https://github.com/dotnet/corefx/commit/53dc908890102d3a888ba603a06266b85d3f4a9b
2019-07-17 17:53:30 -04:00
Stephen Toub 8707459544 Enable HttpStress to target http.sys in addition to Kestrel (dotnet/corefx#39553)
Commit migrated from https://github.com/dotnet/corefx/commit/d34317fbfb4963e7d42b96c36c314e2af829c3c7
2019-07-16 19:31:47 -04:00
Geoff Kizer 074a4f663d Merge pull request dotnet/corefx#39343 from geoffkizer/enableremotetestsforhttp2
ensure remote server HTTP2 tests are actually using HTTP2

Commit migrated from https://github.com/dotnet/corefx/commit/6ec67c15c3f213206e9cf66a2d69d274d3836e6b
2019-07-16 15:09:58 -07:00
Geoff Kizer a505c27add disable two slow tests that time out in CI
Commit migrated from https://github.com/dotnet/corefx/commit/3bf02562f062bdf0faf787f7cfe1d67539363ed5
2019-07-16 12:16:58 -07:00
Stephen Toub b0517c341f Fix HttpStress GET Parameters operation to respect Kestrel max line length (dotnet/corefx#39535)
* Fix HttpStress GET Parameters operation to respect Kestrel max line length

* Address PR feedback

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/bb0516a4f8d0c4d84eff2ba2a3ad0a4764ece9d2
2019-07-16 13:04:40 -04:00
Eirik Tsarpalis 7bfcebc9cb Merge pull request dotnet/corefx#39485 from eiriktsarpalis/httpstress-randomize-cancellation
HttpStress: Randomize cancellation of requests

Commit migrated from https://github.com/dotnet/corefx/commit/e15d8dcb334ebd896cd2b23359d95c2ca679fdd9
2019-07-16 15:58:47 +01:00
Eirik TsarpalisandStephen Toub aae6b7629d Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Co-Authored-By: Stephen Toub <[email protected]>

Commit migrated from https://github.com/dotnet/corefx/commit/ac239fc682f296c7eeb953f9ee26dd8a0351b6e4
2019-07-16 15:02:44 +01:00
Eirik TsarpalisandStephen Toub 2233d0d264 Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Co-Authored-By: Stephen Toub <[email protected]>

Commit migrated from https://github.com/dotnet/corefx/commit/6b2ddf6b59d62ea0a6720b731678f61fbbae7634
2019-07-16 14:59:34 +01:00
Eirik TsarpalisandStephen Toub 5ac7e30412 Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Co-Authored-By: Stephen Toub <[email protected]>

Commit migrated from https://github.com/dotnet/corefx/commit/35dec8a0cd2850ab9e0d5a97cfac4f458a3550a9
2019-07-16 14:59:22 +01:00
Eirik TsarpalisandStephen Toub 20da6cd7c7 Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Co-Authored-By: Stephen Toub <[email protected]>

Commit migrated from https://github.com/dotnet/corefx/commit/ae4dc79e57514eb9dfe4a8c0480691bd80731969
2019-07-16 14:59:12 +01:00
Eirik TsarpalisandStephen Toub 432e1d99dc Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Co-Authored-By: Stephen Toub <[email protected]>

Commit migrated from https://github.com/dotnet/corefx/commit/bee6f7fa2f76f5793a89027132b3ece7af82e30c
2019-07-16 14:58:32 +01:00
Stephen Toub 01d9b32ee3 Propagate abort exceptions from CreditManager.Dispose (dotnet/corefx#39520)
Currently, if an abort occurs, it disposes of credit managers, and if there's a waiter on that credit manager, that waiter propagates an ObjectDisposedException.  It should instead propagate whatever exception resulted from the abort.

Commit migrated from https://github.com/dotnet/corefx/commit/3c71b23c676c3538b33f4ae653cf6f85de77e44d
2019-07-16 07:07:22 -04:00
Eirik Tsarpalis fbd0e2a5b9 remove unused cli param
Commit migrated from https://github.com/dotnet/corefx/commit/7e595109699e301f31e3ffd3dda4aca9755c5c8a
2019-07-16 09:47:43 +01:00
Krzysztof Wicher 7fe6d63d3e Request-in-flight GOAWAY test (dotnet/corefx#39501)
* request-in-flight GOAWAY test

* apply feedback


Commit migrated from https://github.com/dotnet/corefx/commit/3eabd4c7f1cc439233e0f8bae3ba37a8d73b7e8d
2019-07-15 17:00:19 -07:00
Eirik Tsarpalis ea3b0b0da9 force cancellations to only trigger after request has been sent
Commit migrated from https://github.com/dotnet/corefx/commit/524af177fd3e39de47dae3394b516f8a02a6446d
2019-07-15 23:44:58 +01:00
Eirik Tsarpalis 026168ea5c dispose CancellationTokenSources
Commit migrated from https://github.com/dotnet/corefx/commit/58c85e29cfaa4b6bd8002a5c90c5262ca0cb29cf
2019-07-15 23:44:45 +01:00
Eirik Tsarpalis 32b8f50c85 HttpStress: Randomize cancellation of requests
Commit migrated from https://github.com/dotnet/corefx/commit/c4167ed11e1444433a33cc5d44a4aa33e0ffd651
2019-07-15 23:44:45 +01:00
Stephen Toub 343728ed3b Propagate correct exception in Http2Connection.Abort (dotnet/corefx#39496)
Ensure we pass the `_abortException`, not `abortException`, to the streams, and log any non-duplicate exception.

Commit migrated from https://github.com/dotnet/corefx/commit/cfccc26f9e77fa9f745857ec48a256309e29f39d
2019-07-15 17:17:18 -04:00
Anirudh Agnihotry 7adca638bd Added client operation for posting form data (dotnet/corefx#39437)
* added client operation for post data

* client operation for multipart data content

* remove the subset test


Commit migrated from https://github.com/dotnet/corefx/commit/eee164d069f36ed4d8f850799bd6b9e414b2d23b
2019-07-15 14:13:30 -07:00
Stephen Toub d2c2aba33e Ensure that CancellationToken is propagated to built-in request content types (dotnet/corefx#39474)
* Ensure that CancellationToken is propagated to built-in request content types

We don't currently expose the overload that would allow CancellationToken to be accessed by HttpContent-derived types in general, but we can at least ensure that when using the built-in content types, the CancellationToken provided to SendAsync is appropriately threaded through.  We were doing this previously in only a few cases, where we knew that the previous overload wouldn't be overridden (namely internal types and sealed types), but we can enable the 90% scenario as well by doing a type check at run-time.

* Disable cancellation test for UAP handler


Commit migrated from https://github.com/dotnet/corefx/commit/450f49a1a80663529b31d3defafbd5e59822a16a
2019-07-15 16:17:56 -04:00
Stephen Toub 920886e407 Fix SocketsHttpHandler canceling request when response stream dropped (dotnet/corefx#39471)
* Fix SocketsHttpHandler canceling request when response stream dropped

Good code using HttpClient should Dispose of the HttpResponseMessage and/or response Stream when its done with it.  However, if code fails to do so, we still want to ensure that we don't leak connections/requests to the server or leak resources on the client.  If the response isn't disposed but the code reads all the way to the end of it, then internally things are cleaned up.  But if the response isn't disposed and hasn't read to the end, for both HTTP/1.1 and HTTP/2, we have some issues.

For HTTP/1.1, we rely on the Socket's finalization to close the associated connection.  However, we use a cache of SocketAsyncEventArgs instances to handle creating connections, and it turns out that these SocketAsyncEventArgs instances are keeping around a reference to the last created Socket.  If the SAEA is reused for another connection, then there's no issue, but until it is, it maintains several references to the socket: in ConnectSocket, in _currentSocket, in _multipleConnect, and then further within another SAEA instance that the _multipleConnect itself is creating for some reason.  We should go through and clean all that up in SAEA, but for now, this just removes the SAEA cache.

For HTTP/2, nothing was cleaning up in this case.  To handle it, we:
1. Make the response stream finalizable, such that when finalized it behaves as if Dispose were called.
2. When SendAsync completes, we remove the strong reference from the Http2Stream to the response message, such that the response (and in turn the response stream) doesn't get rooted by the Http2Connection storing the Http2Stream in its dictionary).
3. The only reason that reference was still needed was to support trailing headers.  So we create a lazily-allocated list on the Http2Stream for storing trailers if any should arrive, and then when the response body completes, the response stream pulls those headers in from the temporary collection into the response that it then has a reference to.  This also helps to avoid a race condition where consuming code erroneously accesses TrailingHeaders before the request has completed, in which case we previously could have been trying to write to the collection while user code was reading from it; with this change, that mutation happens as part of a call the consumer makes.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/8b5eb8d9fb7857e5b40e763287f8f8832c15af31
2019-07-15 13:12:27 -04:00
Cory Nelson fdf096a524 Update Http2_FlowControl_ClientDoesNotExceedWindows to use ByteAtATimeContent for compat with recent buffering change. (dotnet/corefx#39472)
Clear ActiveIssue as original issue in dotnet/corefx#38799 could not be reproduced.

Commit migrated from https://github.com/dotnet/corefx/commit/929bd81ee11728434ebf9c06152408b4b9940d12
2019-07-14 21:19:34 -07:00
Geoff Kizer cd11208e18 revert workarounds for 39372
Commit migrated from https://github.com/dotnet/corefx/commit/0aea825037c13e522bec6f6bc21df37720a1b414
2019-07-13 17:19:39 -07:00
Geoff Kizer 6a5753c061 disable cert validation for HTTP2 endpoint on Linux
Commit migrated from https://github.com/dotnet/corefx/commit/d34a2579ad53d72fd2482b4faada174416497041
2019-07-13 17:17:33 -07:00
Geoff Kizer f1c413c0b4 revert change to CreateHttpClient, now that CreateHttpClientForRemoteServer is used instead
Commit migrated from https://github.com/dotnet/corefx/commit/14f9968db06634919b03a438763f10522834fc23
2019-07-13 17:17:33 -07:00
Geoff Kizer 94daa1bd35 convert a few more tests to also use HTTP2 remote server
Commit migrated from https://github.com/dotnet/corefx/commit/1db9d56078f729d3079e95cd1c9183e64413c8f2
2019-07-13 17:17:32 -07:00
Geoff Kizer bb2fa10f05 disable version check on platforms that don't support ALPN
Commit migrated from https://github.com/dotnet/corefx/commit/c11af5504d806fd02874457d80db2e92b072385e
2019-07-13 17:17:32 -07:00
Geoff Kizer c1bb738b53 fix NETFX and UWP build issues
Commit migrated from https://github.com/dotnet/corefx/commit/b2216d60d2a2f9416eadb4bae015eb1524407d71
2019-07-13 17:17:32 -07:00
Geoff Kizer e89fbd6b5e ensure remote server HTTP2 tests are actually using HTTP2 and modify some remote server tests to run over HTTP2 as well as HTTP/1.1
Commit migrated from https://github.com/dotnet/corefx/commit/f013baadc511567f012d6132f9e710fb3acafb66
2019-07-13 17:17:31 -07:00
Krzysztof Wicher 03a36223e9 Retry on GOAWAY (dotnet/corefx#39127)
* Retry on GOAWAY

* send correct GOAWAY on retried connection, update comment

* Harden against flakiness

* Fix: Connection refused error is different on Debian

* apply feedback

* Make partial body/received headers case deterministic, pass error code on REFUSED_STREAM

* apply latest feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1841042b99062de13dc80098cede9413be569238
2019-07-12 21:07:20 -07:00
Anirudh Agnihotry f6ba5eabd4 Added client operation for get query with parameters (dotnet/corefx#39398)
* added client operation for get query with parameters

* using stringBuilder for expected string and allowing user to control size when query parameters are present

* typo corrected


Commit migrated from https://github.com/dotnet/corefx/commit/54a2443797b070db11dcd82014a2d8c56f7cbc78
2019-07-12 11:51:18 -07:00
Cory Nelson d030f6ae8a Read WinHTTP's proxy format correctly (dotnet/corefx#39371)
Fix SocketsHttpHandler to properly read WinHTTP's proxy string format, preventing an exception when a PAC script returns multiple proxies. Resolves dotnet/corefx#39104.

Commit migrated from https://github.com/dotnet/corefx/commit/70b45baaf36eab34fcfb44056b030654dba9a4dc
2019-07-12 09:58:34 -07:00
Eirik Tsarpalis 648f0316ba Http2Connection: Wrap InvalidOperationExceptions (dotnet/corefx#39400)
* Http2Connection: Wrap InvalidOperationExceptions

To achieve parity with the v1.1 implementation. Fixes dotnet/corefx#39295

* do not shutdown connection on server side

* prevent disposal of client before server has established connection


Commit migrated from https://github.com/dotnet/corefx/commit/68e7999c846131bd8cd43899671fa6a4a7b5da53
2019-07-12 09:39:52 -07:00