Commit Graph
2232 Commits
Author SHA1 Message Date
Justin Kotalik 9c4e678eb8 Synchronize Http/2 HPack implementation between CoreFx and ASP.NET Core (dotnet/corefx#41069)
Commit migrated from https://github.com/dotnet/corefx/commit/547a2936f07203ad7ac03603fa96d443542ee307
2019-10-02 07:36:01 +09:00
Stephen Toub e851484147 Remove unnecessary dependencies from System.Net.Http (dotnet/corefx#41470)
Commit migrated from https://github.com/dotnet/corefx/commit/e4cfb1761f20b182919db2aeb6ba92b48492c469
2019-10-01 15:43:41 -04:00
Eirik Tsarpalis 534b8d8681 HttpClientHandler functional test: replace remote server dependency (dotnet/corefx#41229)
* HttpClientHandler functional test: replace remote server dependency

Replaces remote server dependency for HttpClientHandler_MaxResponseHeadersLength_Test.SetAfterUse_Throws.
Fixes dotnet/corefx#41148

Commit migrated from https://github.com/dotnet/corefx/commit/b020d0033ffe755f779c564186fc2d98b0af31cc
2019-09-20 18:32:06 +03:00
Zach Read c3597ac4dd Allow X509Chain to replace the root trust list when building a chain
This enables users of X509Chain to specify a priori a set of trusted root authorities, which is used in place of the default root authorities.

By explicitly specifying the root authorities the caller enables revocation checking for normally untrusted roots, and simplifies the certificate acceptance by having the chain engine tell them if the root matched, vs doing a post-build check (in the case of cross-certified authorities this even tells the chain engine which path to prefer).

Commit migrated from https://github.com/dotnet/corefx/commit/e70e76159b3f34e4e35d241daf39d4f57f4bd82c
2019-09-18 08:31:26 -07:00
Stephen Toub df771c4e0b Remove unused files from System.Net.Http (dotnet/corefx#41155)
Commit migrated from https://github.com/dotnet/corefx/commit/e9836aa6bdd40d76d8cf3534e491d90421c4bd9a
2019-09-17 17:17:49 +03:00
Stephen ToubandJan Kotas 78d665b987 Remove System.Net.Http dependency on System.Text.RegularExpressions (dotnet/corefx#41110)
* Remove System.Net.Http dependency on System.Text.RegularExpressions

This dependency is the only reason we end up with a 105K System.Text.RegularExpressions.dll as part of a trimmed new MVC app.  Regex is used in the case where on Windows a bypass list is provided, in which case each item in the list is changed into a regex, which is then evaluated against each url provided to SocketsHttpHandler.  But the patterns usable are simple: the only special character recognized is an asterisk, which can map to zero or more of any character.  So, we can instead employ a simple processor for such patterns, which then eliminates the need to reference System.Text.RegularExpressions.dll from System.Net.Http.dll.  It also happens to be faster.

* Address PR feedback

* Update src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs

Co-Authored-By: Jan Kotas <[email protected]>


Commit migrated from https://github.com/dotnet/corefx/commit/0e65e923689962f9634b5948d15f995140cc7c93
2019-09-16 14:56:59 -04:00
David Shulman 6e990fd4ca Disable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds (dotnet/corefx#41109)
The remote server "revoked.badssl.com" has a certificate which is not only revoked but also
now untrusted since it has expired.

Disabling test for now

Contributes to dotnet/corefx#41108

Commit migrated from https://github.com/dotnet/corefx/commit/8350134a21960df364517c9c766937ae47bf76c5
2019-09-14 08:50:30 -07:00
Tomas Weinfurt 4b7edb6003 use configuration for invalid host name (dotnet/corefx#41083)
Commit migrated from https://github.com/dotnet/corefx/commit/19ea63fee517327e1f6fbfa730300ddef5ef8a3b
2019-09-13 09:40:36 -04:00
Tomas Weinfurt 4702304395 improve two http2 tests (dotnet/corefx#40797)
Commit migrated from https://github.com/dotnet/corefx/commit/9eed67227c2d0766c1b7fe40fa8a1a97097e3beb
2019-09-11 12:16:01 -07:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Viktor Hofer f1426468d4 Disable two networking tests on UAP (dotnet/corefx#40875)
* Disable timeout sensitive networking test on UAP

Disabling GetAsync_CancelPendingRequests_DoesntCancelReadAsyncOnResponseStream on UAP

* Update HttpClientHandlerTest.Cancellation.cs


Commit migrated from https://github.com/dotnet/corefx/commit/9161098ade5075a8c126b2d7eb98abbeadff2961
2019-09-06 09:42:03 -07:00
Tomas Weinfurt 5fb317f553 use type for Http2LoopbackServer.CreateServer (dotnet/corefx#40863)
Commit migrated from https://github.com/dotnet/corefx/commit/b46ebcb9a2408f9826c103ce6b340b419d948512
2019-09-05 21:27:05 -07:00
Tomas Weinfurt 8278bf8670 update SendAsync_ConcurentSendReceive_Ok to use DuplexContent (dotnet/corefx#40858)
Commit migrated from https://github.com/dotnet/corefx/commit/88017f967529d30272ad75028e5538f35087e451
2019-09-05 16:49:16 -07:00
Cory Nelson b0c6eb77cd Support PAC scripts that return multiple proxies (dotnet/corefx#40082)
* Support PAC scripts that return multiple proxies.

Resolves dotnet/corefx#39370 

Commit migrated from https://github.com/dotnet/corefx/commit/5e97c2b50ac2b18909606ce3ea14c3e7e61db7e8
2019-09-05 02:11:47 -07:00
Tomas Weinfurt c4efc1dafd fix more tests to work with http2 (dotnet/corefx#39019)
* fix cancelation tests to work with http2

* fix more tests and feedback from review

* feedback from review

* fix issues with missing connection: close

* update body check

* feedback from review

* fix resolve

* feedback from review


Commit migrated from https://github.com/dotnet/corefx/commit/5108d9245b891deeb36a164f434f4fb6975c8baf
2019-09-04 16:48:34 -07:00
Stephen Toub 11f952306a Remove readonly from two GCHandle fields (dotnet/corefx#40807)
Due to the `readonly`, the mutations performed by `Free` will be done on a copy rather than on the data stored in the field.

Commit migrated from https://github.com/dotnet/corefx/commit/437ce88edeb835e1dbe94c6d418b6169b69745fb
2019-09-04 17:46:09 -04:00
Tomas Weinfurt c363e029ea replace CRLF with Environment.NewLine where appropriate (dotnet/corefx#40723)
* replace CRLF with Environment.NewLine where appropriate

* use sb.AppendLine

* fix more unit tests


Commit migrated from https://github.com/dotnet/corefx/commit/a6e7ffd72db078a46612afa9d085bd27ef8e2fed
2019-09-03 22:34:24 -04:00
Tomas Weinfurt efe32d48a8 surface _abortException (dotnet/corefx#40785)
Commit migrated from https://github.com/dotnet/corefx/commit/bc7e561e28839c56f7465f3382d5f60716a34bab
2019-09-03 22:11:43 -04:00
Stephen Toub f08a1c9c9b Pass a CancellationToken in a few more places (dotnet/corefx#40715)
Most of these to WaitAsync shouldn't actually matter, as the semaphores being used are there for corner cases or to protect erroneous usage, but if there's no contention, passing a token won't hurt, and if there is contention, passing the token makes it more robust.

Commit migrated from https://github.com/dotnet/corefx/commit/14a7adb23569363b94d575d64b7cb1f38cda3e4a
2019-09-03 15:24:08 -04:00
Eirik Tsarpalis ea60c15a90 Httpstress: Add more checksum validations & expose Kestrel Http2 limits configuration (dotnet/corefx#40708)
Httpstress: Add more checksum validations & expose Kestrel Http2 limits configuration

Commit migrated from https://github.com/dotnet/corefx/commit/a64e40535283d6470c2909c8f08b178454a8718b
2019-08-30 23:14:49 +02:00
Stephen Toub 4fc5d8971d Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/b49a8a9be1d53cd9e50cb68fd8540be25c65d433
2019-08-24 07:47:35 -04:00
Stephen Toub 7bdae2162f Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.

Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.


Commit migrated from https://github.com/dotnet/corefx/commit/93285e4511a9656a30b92b8b6a9088608aac40e0
2019-08-24 07:47:35 -04:00
Stephen Toub bfa8c26dcb Fix StyleCop warning SA1001 (spaces around commas)
Commit migrated from https://github.com/dotnet/corefx/commit/37f351d310f07560274c63862ceaed8afd54a46f
2019-08-24 07:47:35 -04:00
Eirik Tsarpalis 2077e8783b Httpstress: Add checksum validation & support plaintext http (dotnet/corefx#40360)
Httpstress: Add checksum validation & support plaintext http

Commit migrated from https://github.com/dotnet/corefx/commit/a25beeee0af0c849eef58c45579733efa0d55f8d
2019-08-22 21:55:04 +01:00
Eirik Tsarpalis 6379ad84d3 HTTP2: fix header corruption issue (dotnet/corefx#40487)
* HTTP2: fix header corruption issue

Fixes a bug in HPackEncoder which results in header
data corruption in cases where the write buffer has
not been zeroed out. Adds HPack roundtrip tests.
Fixes dotnet/corefx#40459.

Commit migrated from https://github.com/dotnet/corefx/commit/6f9796080563c9c40359e641e3287fabe42b580c
2019-08-22 21:49:07 +01:00
madmir 018e1b82e8 Re-enable xunit warning 2017 (dotnet/corefx#40467)
* Re-enable xunit warning 2017

Use specialized assertions for checking for elements in collections.

* Revert Re-enable xunit warning 2017, revert some test changes

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2fc48e13e87a4e68576d7df7af420ac2874e929e
2019-08-22 10:17:26 -04:00
madmir 6f12721616 Re-enable xunit warning 1019 (dotnet/corefx#40415)
Make MemberData reference IEnumerable<object[]>

Commit migrated from https://github.com/dotnet/corefx/commit/3c09762fa14249c65e5bc676a5d812c2654c8941
2019-08-19 20:59:07 -04:00
Stephen Toub 9885a60658 Fix IDE0066 across corefx (dotnet/corefx#40288)
* Fix IDE0066 across corefx

"Fix all", but then manual tweaking to accommodate places the rule doesn't work quite right.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/f71a5a1d88214a9e2c26ff2ff8bcfb1017aa6713
2019-08-16 11:24:54 -04:00
Stephen Toub 52c39738de Fix a few missing $s for string interpolation in tracing (dotnet/corefx#40322)
Commit migrated from https://github.com/dotnet/corefx/commit/d116b2d4ee4041970943d6fffdf8a97446f8b6ff
2019-08-15 08:50:12 -04:00
Stephen Toub cae3309c0a Fix non-ASCII characters across corefx (dotnet/corefx#40318)
* Fix several non-visible characters in test files

* Replace Unicode surrogate pairs with escaped hex values

* Fix non-ASCII characters in most C# files


Commit migrated from https://github.com/dotnet/corefx/commit/027eb8e19c3498cc2c656931c3b879f5ddb63b0d
2019-08-15 08:17:46 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -04:00
Krzysztof Wicher 8a80b68d18 Add TLS 1.3 to all protocols in GetAsync_AllowedSSLVersion_Succeeds (dotnet/corefx#40281)
Commit migrated from https://github.com/dotnet/corefx/commit/302b3283f5439907ca2586784ba32381ac312f72
2019-08-13 10:48:28 -07:00
Krzysztof Wicher c4b980aadd Fix 2 System.Net.Http tests failing on debian (dotnet/corefx#40259)
Commit migrated from https://github.com/dotnet/corefx/commit/af36939acdf751d2465358be3f892170f73f9b48
2019-08-12 23:01:21 -07:00
Stephen Toub 50b30c6f63 Avoid disposing Http2Stream's request body cancellation source (dotnet/corefx#40255)
Commit migrated from https://github.com/dotnet/corefx/commit/a4f5f13ec1fa0d51ce0964c126e35ef0046ea7be
2019-08-12 21:24:30 -04:00
Stephen Toub 6a988c7d03 Enable StyleCop rules 1205, 1411, 1026, and 1000 (dotnet/corefx#40254)
* Fix StyleCop warning SA1411 (attribute ctor shouldn't use unnecessary parens)

* Fix StyleCop warning SA1026 (new[] spacing)

* Fix StyleCop warning SA1000 (consistent spacing around if, for, switch, etc.)

* Fix StyleCop warning SA1205 (partial elements should declare an access modifier)


Commit migrated from https://github.com/dotnet/corefx/commit/0c4c234a918254d569ffb0f6a607f98193608646
2019-08-12 22:45:34 +02:00
Stephen Toub 2a47457139 Make several local functions static (dotnet/corefx#40251)
Commit migrated from https://github.com/dotnet/corefx/commit/d3155017e1fe6acdb72e2d1b30c5b2e36cf21af8
2019-08-12 15:08:18 -04:00
Viktor Hofer 555649a675 Disable two SocketsHttpHandler tests on Debian10 (dotnet/corefx#40247)
Commit migrated from https://github.com/dotnet/corefx/commit/eb58b0a0e0a45c42d67b69b44047cf60116650c3
2019-08-12 10:18:13 -04:00
Stephen Toub 182e23d123 Re-enable StyleCop warning SA1400 (elements should specify access) (dotnet/corefx#40240)
One of the more common things we "nit" in PRs.  Now the compiler will flag it for us.

Commit migrated from https://github.com/dotnet/corefx/commit/61a6264018989e06d314b68d57bd91b4b72e4360
2019-08-12 14:29:19 +02:00
Eirik Tsarpalis 3b91c9be5e HttpStress: add a 'GET Slow' operation (dotnet/corefx#40157)
* HttpStress: add a 'GET Slow' operation

Adds a 'GET Slow' operation. Additionally randomize 
the response content in GET requests. These are 
validated by having the client specify the expected 
content length in request headers.

Commit migrated from https://github.com/dotnet/corefx/commit/ba8156d2f0d206655caf0713f6bed0265f48f098
2019-08-09 19:35:03 +01:00
Geoff Kizer c2ff61e7d1 ensure we don't try to send RST_STREAM or EndStream while holding the stream lock (dotnet/corefx#40123)
Commit migrated from https://github.com/dotnet/corefx/commit/719b8fb635db44ba80ea6d5f2e7effaf5906f588
2019-08-09 05:09:37 -07:00
Stephen Toub 087592a6e8 Fix several test use of RunContinuationsAsynchronously (dotnet/corefx#40121)
Commit migrated from https://github.com/dotnet/corefx/commit/d3911035f2ba3eb5c44310342cc1d654e42aa316
2019-08-07 21:08:35 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Krzysztof Wicher 5fc645652b Disable System.Net.Http.FunctionalTests SetDelegate_ConnectionSucceeds on OSX (dotnet/corefx#40119)
* Disable SetDelegate_ConnectionSucceeds on OSX

* apply PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/9ac414a6781d05ce7d1d26488a72e6b8201bb071
2019-08-07 16:24:47 -07:00
Stephen Toub 34e34383a3 Re-enable StyleCop warning SA1113 (comma on same line as previous parameter)
Commit migrated from https://github.com/dotnet/corefx/commit/e83c72910b62ea31fdb4952795a5322be7a98540
2019-08-07 19:15:26 -04:00
Stephen Toub 5841b6997a Re-enable StyleCop warning SA1302 (interface names should begin with I)
Commit migrated from https://github.com/dotnet/corefx/commit/b746716a4506976d16f65d798652528ce81afa65
2019-08-07 19:15:26 -04:00
Stephen Toub e8ac02bcf5 Re-enable StyleCop warning SA1020 (++ preceded by a space)
Commit migrated from https://github.com/dotnet/corefx/commit/7813ff5a30fde8ee74dec884fdcec29864039e2a
2019-08-07 19:15:26 -04:00
Eirik Tsarpalis c19973aecb HttpStress: fixed unhandled exceptions being eaten (dotnet/corefx#40090)
Commit migrated from https://github.com/dotnet/corefx/commit/dee4e93caad860030646d4fef7812f337df6a5f4
2019-08-07 10:31:04 -04:00
Stephen Toub c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Cory Nelson 9cc4a567a6 Fix DynamicTable.Resize failing when it grows the table. (dotnet/corefx#40040)
Fixes DynamicTable.Resize failing when it grows. Resolves dotnet/corefx#39967
Updates DynamicTable.EnsureAvailable to null out unused buffers. Allows earlier GC, but mainly helps debugging.
Add HeaderField.ToString() to assist with debugging.

Commit migrated from https://github.com/dotnet/corefx/commit/cc5653fcceefce5eac38dc7847b12b371027f78f
2019-08-06 18:23:03 -07:00
Eirik Tsarpalis 2caa228c48 HttpStress: Add aggregate reports to end of test runs (dotnet/corefx#39928)
* HttpStress: Add aggregate reports to end of test runs

Reworks the StressClient so that an aggregate report of
encountered stress errors are printed to stdout at the
end of a test run.

Commit migrated from https://github.com/dotnet/corefx/commit/042369feaacdb65504b58e9621d56a2d1c7ffd1c
2019-08-06 23:09:33 +01:00