Commit Graph
1446 Commits
Author SHA1 Message Date
Jeff HandleyandEirik Tsarpalis e82f56f2fc Fix broken docs links (#1005)
* Fix broken docs links in txt/md files under src

* Fix broken docs links found in source code

* Fix broken docs links in workflow docs

* Fix broken docs links in build commands

* Fix broken docs links in HTML resource files

* Update HTTP/SSL stress test docs for local builds

Co-Authored-By: Eirik Tsarpalis <[email protected]>

* Fix a few remaining broken links

Co-authored-by: Eirik Tsarpalis <[email protected]>
2020-01-06 17:17:21 -08:00
Jan Kotas 25d316cefa Move Corelib shared files under Common (#1307)
Contributes to #1232
2020-01-06 09:07:16 -08:00
Miha Zupan 4d3ec15a0e Implement HttpContent and HttpClient cancellation APIs (#686)
* Implement HttpContent and HttpClient cancellation APIs

Implements APIs approved in dotnet/corefx#32615 and dotnet/runtime#576

* Use new CreateContentReadStreamAsync overload in MultipartContent

* Expose HttpContent.SerializeToStreamAsync overload with cancellation

* Remove HTTP_DLL preprocessor directives

* Rename WIN_HTTP_HANDLER to WINHTTPHANDLER_DLL

* Use more 'var' where type is obvious
2020-01-06 12:28:15 +01:00
Viktor Hofer c2d89a824a Remove usage of TargetGroup where possible (#899)
In non-infra related paths we don't need to check on TargetGroup anymore
and can instead use the well-known TargetFramework property.
2019-12-16 19:36:55 +01:00
Anirudh Agnihotry 3b9abae5aa Removing "netcoreapp" and "netfx" TargetGroup (#457)
* netcoreapp -> netcoreapp5.0 in .sln files

* netcoreapp; -> netcoreapp5.0;  , netcoreapp- to netcoreapp5.0-

* netcoreapp- -> netcoreapp5.0 in .csproj

* 'netcoreapp -> 'netcoreapp5.0 in .csproj

* done with libraries sub folder

* missed semicolon

* minor changes

* netcoreapp -> netcoreapp5.0 in some extra files

* vNext target variable in configurations.props

* netcoreapp => netcoreapp5/0 in some other .props file

* netcoreapp -> vnext in .csproj

* making the netcorepap framework switch work

* fixing sendToHelix and linux build

* TargetFrameworkVNext -> netcoreappCurrent

* case correct netcoreappcurrent

* fixing send to helix zip path

* netfx -> net472 in .sln

* netfx; -> net472; in .props

* netfx- -> net472- in .props

* netfx - -> net472- in .csproj

* 'netfx-> 'net472 in .csproj

* netfx -> net472 manual change

* fixing ci build for netfx

* Not trying to change the global property

* Fixing build failure due to master changes in net https tests

* adding documentaiton and fixing filtering

* netcoreapp -> netcore5.0 in py file

* changing the path to use netcoreapp5.0 version

* feedback and override corefx path corrected in installers

* remaing netcoreapp5.0 changes done

* netcoreapp-> netcoreapp5.0 after live builds

* net472 -> netframeworkcurrent
2019-12-14 12:22:29 -08:00
Eirik Tsarpalis 395107644e Consolidate NCL stress testing infrastructure (#700) 2019-12-12 19:05:22 +02:00
Roman Marusyk 3d9a603e19 Consolidate .netcoreapp.cs test files in System.Net.* (#664)
* Consolidate .netcoreapp.cs files because System.Net.* projects is no longer cross-compiled

* Fix build

* Add end-of-line
2019-12-09 05:48:49 -08:00
David Shulman 24062e30d7 Enterprise Testing System (#463)
This is the first of several PRs that add Enterprise Scenarios Testing capability to
the repo. This PR focusses on Linux which allows for docker containers to be used
in an enterprise network configuration.

I focussed on 2 workflows: 1) The 'dev' workflow, and 2) The PR/CI workflow. The dev
workflow works well since it's using containers in a docker-compose environment along
with volume mounting your current dev's repo enlistment. The PR/CI workflow gives us
an Azure DevOps pipeline to automate verification.

I still need to work with the infra team to add a real pipeline that will run. I can't
do that until this is merged. In the meantime, I have my own DevOps pipeline that verified this PR.

See: https://dev.azure.com/systemnetncl/Enterprise%20Testing/_build/results?buildId=141

I will be linking a follow-up GitHub issue describing the roadmap for building on this system
including adding Windows environments, NTLM protocol, proxies, and other libraries such as
System.Net.Mail and System.Data.SqlClient. Those libraries also use Negotiate/Kerberos/NTLM
enterprise-oriented protocols.

Contributes to:
https://github.com/dotnet/corefx/issues/41652
https://github.com/dotnet/corefx/issues/41489
https://github.com/dotnet/corefx/issues/36896
https://github.com/dotnet/corefx/issues/30150
https://github.com/dotnet/corefx/issues/24707
https://github.com/dotnet/corefx/issues/10041
https://github.com/dotnet/corefx/issues/6606
https://github.com/dotnet/corefx/issues/6161

* Address PR feedback

* Change pipeline *.yml to only run on selected filepaths for PRs
* Change kdc container Dockerfile to be based on ubuntu:18.04
* Fix typo in README.md

* Update .yml file

* Link (instead of copy) apache kerb module to the right place
2019-12-05 15:32:13 -08:00
Marie Píchová ad8115d577 Removed WinHttpHandler from System.Net.Http (#397)
* Removed WinHttpHandler from System.Net.Http.

* Disabled tests for WinHttpHandler.

* Removed UseSocketsHttpHandler settings

* Removed UseSocketsHttpHandler from tests (all tests use SocketsHttpHandler)

* Removed IsWinHttpHandler from tests.

* Updated WinHttpHandler project file.

* Fixed Linux build/tests.

* Fixed Win build of WinHttpHandler.

* Removed todos.
2019-12-02 17:35:23 +01:00
Alexander Nikolaev 3cec4f50af Current user identity in added to HttpConnectionKey (#303)
On retrieving a connection from a pool, HttpConnectionPoolManager adds the current user identity to the HttpConnectionKey for direct and proxy connections when the default credentials is used on Windows platform. Since on Unix there is not the concept of a user identity on the thread, the identity component in the key is always set to string.Empty.

Fixes dotnet/corefx#39621
2019-12-02 15:15:43 +01:00
Santiago Fernandez Madero 2e5d4eff3b Disable tests on CoreCLR using new attribute (#261)
* Disable tests on CoreCLR using new attribute

* Address PR Feedback
2019-11-27 11:02:52 -08:00
Eirik Tsarpalis 14bd9a3f15 HttpStress: Use Windows containers and docker-compose (#209) 2019-11-25 20:59:16 +00:00
Eirik Tsarpalis 71e32c5046 httpstress: fix load-corefx-testhost.ps1 2019-11-19 14:34:08 +00:00
Stephen Toub e90b018a3b Fix up a bunch of repo references in docs (#60)
This is just prelminary, as all of the docs need to be rationalized with each other now that they're all in the same repo.  But it at least keeps most of the links working for now.
2019-11-15 19:15:37 +01:00
Viktor Hofer d8f6d63e34 Remove IsRuntimeRepository checks (#43)
* Remove IsRuntimeRepository checks

* Remove YAML bits needed for building in core-setup.

* Remove remaining consolidation branches in yml
2019-11-15 01:50:43 +01:00
Santiago Fernandez Madero d8adaeeff2 Fix test build of test project that referenced corefx shared corelib directly and cleanup common path usages (#47)
* Fix test build break and update common path usages to use property

* Use normalize directory for CommonPath and CommonTestPath

* Update instances of CommonPath and CommonTestPath to not use trailing \
2019-11-14 21:03:07 +01:00
Viktor Hofer 8e3694fbdd Fix CodeAnalysis.ruleset path (#35) 2019-11-14 15:38:15 +01:00
Viktor Hofer 00d3a3b733 Update CoreLib path for consolidation (dotnet/corefx#42577)
Commit migrated from https://github.com/dotnet/corefx/commit/dc6136f34c7d4ebbc493a7bb6cf1d15bc82250e6
2019-11-13 20:48:15 +01:00
Stephen Toub 401815ed1c Clean up after CurlHandler removal (dotnet/corefx#42506)
Also fix some stragglers from the netfx and uap handler removals.

Commit migrated from https://github.com/dotnet/corefx/commit/c63fbb73226ae3de3ee38d9b25de24ed3e41b6e2
2019-11-09 08:19:42 -05:00
Marie Píchová 19538490d0 Remove CurlHandler fallback from HttpClientHandler (dotnet/corefx#42451)
* Removed native curl usage and CurlHandler.

* More CURL removal in test code.

* More test fixing.

* Addressing PR comments

* Comments and typos.

* Removed constant bool fields with all occurences.


Commit migrated from https://github.com/dotnet/corefx/commit/8888c74e34f9a7df060258664dffe7ac29916443
2019-11-08 17:09:46 -05:00
Alexander Nikolaev 81bc60b7a3 HttpResponseHeaders validates trailing headers by names (dotnet/corefx#42229)
HttpResponseMessage.TrailingHeaders property is set to a new special instance of HttpResponseHeaders configured to validate trailing headers based on their names instead of types. When a header is being added via an explicit Add call, it checks the header type for the NonTrailing flag indicating a prohibited trailing header and throws an exception if it is found. In contrast, when a header arrives on the wire and is being added with TryAddWithoutValidation call, no extra check is performed because HttpConnection validates trailing headers in this scenario.
Fixes dotnet/corefx#41262

Commit migrated from https://github.com/dotnet/corefx/commit/805d06affd41715db4fb6102e05345d6323fcdf1
2019-11-08 13:41:11 +01:00
Santiago Fernandez Madero 7699e7ef6f Update azure pipelines to account for paths in consolidated repo (dotnet/corefx#42418)
Commit migrated from https://github.com/dotnet/corefx/commit/94a60d5238f654ab22f162ad3d6dac01adcdaeb8
2019-11-07 08:07:26 +01:00
Stephen Toub f6239ca84c Simplify Array.Copy(a, 0, b, 0, c) to Array.Copy(a, b, c) (dotnet/corefx#42343)
VS regex search and replace from `Array.Copy\((.+), 0, (.+), 0` to `Array.Copy($1, $2`, then manually reviewed.  The only changes I reverted were those to the tests for Array itself.

Commit migrated from https://github.com/dotnet/corefx/commit/5ac93ba0cc5843e4a544c8a23b5a9fcb05d0d69d
2019-11-04 06:16:06 -05:00
David Shulman 63dc7462d9 Merge pull request dotnet/corefx#42322 from davidsh/cert_tests
Cleanup HttpClient certificate tests

Commit migrated from https://github.com/dotnet/corefx/commit/897e15d9417e122658cd68bfad7407c56ecbe881
2019-11-03 18:42:42 -08:00
David Shulman 48cd6a8d29 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/43f1ee20feb3db2281d2f9a338a46d8fae06202b
2019-11-03 16:48:16 -08:00
David Shulman be863f4aaa Cleanup HttpClient certificate tests
Some of the client certificate tests weren't running because they were conditioned on having
the "test root" installed. But that isn't needed for these tests.

Moved test to the loopback server. Also, cleaned up code which assumed the tests ran against
.NET Framework or UAP which isn't true anymore.


Commit migrated from https://github.com/dotnet/corefx/commit/a6c0e516956acd30bf412fc23bcb6b82cbb490ae
2019-11-03 09:24:36 -08:00
David Shulman 420e273807 Merge pull request dotnet/corefx#42324 from davidsh/disable_hanging_tests
Disable hanging tests

Commit migrated from https://github.com/dotnet/corefx/commit/d65822a3f6aa21844aceeedb7fce9cdf10af96c2
2019-11-02 14:31:29 -07:00
David Shulman a7c95ab9a6 Disable hanging tests
Contributes to dotnet/corefx#42323


Commit migrated from https://github.com/dotnet/corefx/commit/2c3cb3c1b05626ecd8c0df3e1a06466e34621ba8
2019-11-02 14:29:55 -07:00
Chris Ross 3e8cb443f3 Setup HTTP/2 code for sharing (dotnet/corefx#42070)
Commit migrated from https://github.com/dotnet/corefx/commit/832dfd260bdebffdff91cb67eecbb8b02d5eaff2
2019-11-01 17:31:16 -07:00
Viktor Hofer 926874e00a Use Package suffix instead of PackageId and Version suffix instead of PackageVersion (dotnet/corefx#42289)
* Use Package suffix instead of PackageId

* Manual darc update from build '20191101.2'


Commit migrated from https://github.com/dotnet/corefx/commit/931f79e4670cb73c9347e14714fd892907be6630
2019-11-01 18:27:23 +01:00
Eirik TsarpalisandStephen Halter 791f01a0d7 HttpStress: add docker documentation (dotnet/corefx#42268)
* httpstress: add documentation on dockerized stress runs

* fix stress yml issue

* fix doc issues

* remove commented out code

* remove accidental change

* yaml pipeline variables naming consistency

* Update eng/pipelines/stress/http-linux.yml

Co-Authored-By: Stephen Halter <[email protected]>


Commit migrated from https://github.com/dotnet/corefx/commit/4c3bd8a0533a2e35df371b91045a1a5f0ada7d54
2019-10-31 22:46:28 +00:00
Eirik Tsarpalis 5a7ed95219 Use docker-compose for running stress tests (dotnet/corefx#42186)
HttpStress: add docker-compose scenario


Commit migrated from https://github.com/dotnet/corefx/commit/df648522fd1a1bfaa14e9d1ae7c2eaf4a9c87a7c
2019-10-29 16:46:09 +00:00
Eirik Tsarpalis ca723882d4 HttpStress: Add Stress Pipelines (dotnet/corefx#41833)
Commit migrated from https://github.com/dotnet/corefx/commit/f41ba828c76126a871d986cb5b7e9c44ddf6f3d7
2019-10-25 00:02:30 +01:00
Viktor Hofer e8803ace6e Disabling TaskCanceledQuickly timing out test (dotnet/corefx#41941)
Commit migrated from https://github.com/dotnet/corefx/commit/69fc7edb110a69345253060bb611deb3d4bec417
2019-10-21 15:06:57 +02:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Cory Nelson 4ab1d46ca8 HTTP2: Support receiving dynamic table headers (dotnet/corefx#41295)
Support HTTP2 dynamic table header decode. Improve some exception messaging in HPACK decoder. Resolves dotnet/corefx#41208

Commit migrated from https://github.com/dotnet/corefx/commit/7487aec03dc27b910ad4ea096544b850afc74876
2019-10-16 15:28:50 -07:00
Eriawan Kusumawardhono 89174f25b0 Replace tfm based constants with SDK ones (dotnet/corefx#41601)
* replace DefineConstants with SDK ones

Commit migrated from https://github.com/dotnet/corefx/commit/2133679ff62222ba2734232ab8fa4c65765e82a2
2019-10-15 19:11:40 +02:00
Stephen Toub 7ff3a1100a Reduce RemoteInvoke usage in tests (dotnet/corefx#41741)
Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process.  Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.

This helps measurably with test performance.  Consider the System.ComponentModel.Annotations test suite.  On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified.  With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds.  This should help measurably with CI time in coreclr.

Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477
2019-10-15 12:09:06 -04:00
Eirik Tsarpalis 41a0c3d337 HttpStress: Add scripts for loading the corefx testhost in the environment (dotnet/corefx#41721)
HttpStress: add testhost environment loader scripts


Commit migrated from https://github.com/dotnet/corefx/commit/faefe04a1cd88053cb8d63028494dfe7ea1a97ec
2019-10-14 13:59:16 +01:00
Stephen Toub 48c5afd0e5 Make WebRequest.GetSystemWebProxy() return a working proxy (dotnet/corefx#41692)
* Make WebRequest.GetSystemWebProxy() return a working proxy

Today it returns a singleton on .NET Core that throws PlatformNotSupportedExceptions, and is only used for its reference identity by the WebRequest implementation.  This is problematic for existing code that's taking this proxy and passing it to, for example, ClientWebSocket's Proxy, as it will end up being an expensive nop.  In fact, there's currently no way when targeting netstandard2.0 to tell ClientWebSocket to use a default proxy.

With this fix, WebRequest.DefaultWebProxy (which just defaults to GetSystemWebProxy()) will now return HttpClient.DefaultProxy, which is actually a working proxy implementation.

* Stop throwing NotSupportedException from HttpClient.DefaultProxy.set_Credentials

The OS and how the environment is configured determines what concrete type is returned from HttpClient's DefaultProxy property.  And currently these different types behave differently from set_Credentials.  Two of them are throwing NotSupportedException, which is not expected from the IWebProxy interface.  We should just roundtrip the credentials set, even if they're not used.


Commit migrated from https://github.com/dotnet/corefx/commit/8d21b79b924d29088dbde46d42737a657d466b5e
2019-10-12 08:15:05 -04:00
David Shulman b457137b1e Re-enable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds test
The third-party server we use for this test, revoked.badssl.com, now has a new
certificate that is good for another two years and is also revoked. So, we can
re-enable this test.

Fixes dotnet/corefx#41108


Commit migrated from https://github.com/dotnet/corefx/commit/0dd95fc3d4bd24db0fd860295c5873703d7738f5
2019-10-10 12:34:49 -07:00
Stephen ToubandDavid Shulman 08b76ee2b9 Remove unnecessary length restriction on Uri.Escape{Data/Uri}String (dotnet/corefx#41686)
* Remove unnecessary length restriction on Uri.Escape{Data/Uri}String

* Address PR feedback

Co-Authored-By: David Shulman <[email protected]>


Commit migrated from https://github.com/dotnet/corefx/commit/1d49632bc213416d27ed6c567fd8dd08e00170a1
2019-10-10 06:03:29 -04:00
Eirik Tsarpalis efb1df60cf Httpstress: add max execution time argument (dotnet/corefx#41643)
HttpStress: add max execution time arg

Adds -maxExecutionTime cli argument.
Enables nullable annotations.

Commit migrated from https://github.com/dotnet/corefx/commit/630924d0ccfbac62195927c0f4514fe33d47c729
2019-10-09 11:53:42 +01:00
Stephen Toub 108bf6bbf7 Several improvements to SocketsHttpHandler perf (dotnet/corefx#41640)
* Do not force-parse TryAddWithoutValidation headers in SocketsHttpHandler

When enumerating headers to write them out, do not force them to be parsed if the user explicitly asked for them not to be with "WithoutValidation".  If the key/values are incorrectly formatted, the request may end up being written incorrectly on the wire, but that's up to the developer explicitly choosing it.

* Revert HttpRequestHeaders.ExpectContinue optimization

Several releases ago, when we weren't paying attention to ExpectContinue, we optimized away the backing field for it into a lazily-initialized collection; that made it cheaper when not accessed but more expensive when accessed, which was fine, as we wouldn't access it from the implementation and developers would rarely set it.  But now SocketsHttpHandler checks it on every request, which means we're paying for the more expensive thing always. So, revert the optimization for this field.

* Avoid allocating a string[] per header

When we enumerate the headers to write them out, we currently allocate a string[] for each.  We can instead just fill the same array over and over and over.


Commit migrated from https://github.com/dotnet/corefx/commit/4d346a9ab7b6e619dae3784283acb87bb7a825c9
2019-10-08 21:22:47 -04:00
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
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
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