Commit Graph
743 Commits
Author SHA1 Message Date
Anton Firszov 423f5e1eb1 WinHttpHandler: Read HTTP/2 trailing headers
Fixes #44778
2021-03-10 11:54:22 +01:00
Lakshan FernandoandEric Erhardt 07ea61f581 Suppresses the trimmer warning on TypeAnalysis ctor (#48823)
* eh fix

* test change that inadvertently got checked in earlier

* Suppresses the trimmer warning on TypeAnalysis ctor

* Incorporating FB

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Fix DynamicDependency as per PR feedback

* an earlier change got reverted

* fixed proj file netcore app condition check

* fixed NETCORE_ENGINEERING_TELEMETRY build failures

* fixeing another NETCORE_ENGINEERING_TELEMETRY build failures

* Adding RequiresUnreferencedCode to TypeAnalysis ctor instead of suppressing the warning to get FB, not fully fixed

* PR FB and suppressing warnings for safe calls

* propagated the warning all the way up

* CI build break fix for one file

* excluding NativeRTEventSrc from being build in a project

* Missed couple of supppressions on NativeRTEventSrc

* build break fixes

Co-authored-by: Eric Erhardt <[email protected]>
2021-03-08 14:40:58 -08:00
Anton Firszov c003837341 WinHttpHandler tests: AllowAllCertificates should not be static (#48817)
Altering the global state can break prerequisites of unrelated tests.
2021-03-02 12:09:19 +01:00
Geoff KizerandGeoffrey Kizer 57acd56766 Refactor some HTTP remote server tests (#47252)
move existing remote server tests in HttpClientHandlerTest.cs into a new file, HttpClientHandlerTest.RemoteServer.cs

Co-authored-by: Geoffrey Kizer <[email protected]>
2021-01-22 12:43:37 -08:00
Viktor Hofer ceaa8ae8f7 Inline package descriptions and remove descriptions.json files across the repo (#46306)
* Support runtime package descriptions

* Update arcade Packaging pkg

* Inline pkg descriptions for coreclr

* Inline pkg descriptions for mono

* Inline pkg descriptions for installer

* Inline pkg descriptions for libraries
2020-12-22 16:07:56 +01:00
Anton Firszov 18d1527c07 WinHttpHandler: apply [SupportedOSPlatform("windows10.0.19041")] on TcpKeepAlive properties (#45494)
WINHTTP_OPTION_TCP_KEEPALIVE is only available since the May 2020 Update, so it's reasonable to decorate the TcpKeepalive API with [SupportedOSPlatform]
2020-12-08 19:09:03 +01:00
Anton FirszovandJan Kotas 35744328d0 WinHttpHandler: fix double -> uint conversions for ARM64 (#45480)
* extend ReceiveDataTimeout functional coverage

* fix double -> uint conversions

* more comments + remove 'unchecked'

* Comment suggestion

Co-authored-by: Jan Kotas <[email protected]>

* Comment suggestion

Co-authored-by: Jan Kotas <[email protected]>

Co-authored-by: Jan Kotas <[email protected]>
2020-12-02 16:41:21 -08:00
Anirudh AgnihotryandViktor Hofer 659c5fbc7f disable restore in vs for projects targeting platform specific old frameworks (#44932)
* disable vs restore in vs for projects targeting platform specific older frameworks

* Add infra to auto-update solution files for restore

* Add NuGet.config files for solutions affected by restore issue

Co-authored-by: Viktor Hofer <[email protected]>
2020-12-02 23:18:52 +01:00
Anton Firszov 837785f9ca Implement TCP Keep-Alive for WinHttpHandler (#44889)
Implements the final version of the API proposal in #44025 except the [SupportedOSPlatform("windows10.0.2004")] bits
2020-11-25 15:13:09 +01:00
Viktor Hofer ed295782bf Add workflow to update solution files with SlnGen and update them initially (#44703)
* Add slngen infra

* Update all solution files
2020-11-17 18:23:30 +01:00
Anirudh Agnihotry b37f10a504 Changing Windows_NT -> Windows for enabling TargetPlatformMoniker feature of the sdk for platform specific tfms. (#43651)
* eng change

* coreclr change

* libraries change

* tests change

* installer & mono change

* py files changed

* .md change

* .yml change

* remove redundant targetos property

* Windows_NT -> windows after ninja change

* fixing runtime build failure
2020-11-02 14:25:58 -08:00
Marie Píchová c9dda914b9 Removed unnecessary WINHTTPHANDLER_DLL compiler constant. (#43393) 2020-10-14 17:05:55 +02:00
Stephen ToubandCarlos Sanchez d3beb6014a Implement ZLibStream and fix SocketsHttpHandler deflate support (#42717)
* Implement ZLibStream and fix SocketsHttpHandler deflate support

- Implements ZLibStream, exposes it in the ref, and add tests
- Fixes SocketsHttpHandler to use ZLibStream instead of DeflateStream

* Add comment about deflate content encoding

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <[email protected]>

* Fix netfx build

Co-authored-by: Carlos Sanchez <[email protected]>
2020-10-09 06:12:47 -04:00
Geoff KizerandGeoffrey Kizer fdc6472bd1 add System.Net.Quic assembly and use it in HttpClient (#43076)
* add System.Net.Quic assembly and use it in HttpClient

* fix build issue

* remove old quic code from shared directory

* fix Common.Tests project

* fix WinHttp tests

* fix typo

Co-authored-by: Geoffrey Kizer <[email protected]>
2020-10-06 19:01:33 -07:00
Stephen Toub 3b6600cbef Add IDE warnings to code analysis ruleset (#42566)
- Add all IDEXXXX warnings to ruleset, but as hidden for now
- Enable IDE0073: file header mismatch
2020-09-23 22:26:31 -04:00
Stephen Toub e4034f8d85 Fix several BeginXx nullable annotations (#42442)
AsyncCallback and object state parameters in APM BeginXx methods should always be nullable.  Several in annotated libraries were annotated incorrectly.
2020-09-19 06:51:20 -04:00
Viktor Hofer 2182936365 Add transitive CompilerServices.Unsafe dependency (#41616)
* Add transitive CompilerServices.Unsafe dependency

for System.Memory and System.Threading.Tasks.Extensions package
references. Adding the dependency as a P2P to prefer the live asset
over the prebuilt.
2020-09-07 22:18:28 +02:00
Marie Píchová ba7c518a49 Renamed EventSources "Microsoft-"->"Private.InternalDiagnostics.". 2020-08-17 13:10:32 +02:00
Alexander KöplingerandSteve Pfister c6eac1f2d5 Cleanup old corefx/coreclr GitHub issue links (#40286)
Replace them with the current URL after the redirect.

Similar to https://github.com/dotnet/runtime/pull/2063.

Co-authored-by: Steve Pfister <[email protected]>
2020-08-13 23:13:51 +02:00
Jan Jahoda 4a436e3313 Configure ping in HTTP2 (#40257) 2020-08-13 08:51:29 +02:00
Tomas Weinfurt ff01831094 make ssl tests more portable (#40303)
* make ssl tests more portable

* feedback from review

* fix build

* fix http broken by one previous commits

* feedback from review

* fix tests with old ssl versions.S

* more ssl fixes
2020-08-09 18:46:16 -07:00
Stephen Toub aa5fdab965 Update Microsoft.CodeAnalysis.NetAnalyzers to 3.3.0-beta3.20407.4 (#40560) 2020-08-09 05:32:44 -04:00
Tomas Weinfurt 664d9f8661 cleanup schannel pal (#39755)
* cleanup schannel pal

* fix netfx
2020-08-04 10:28:04 -07:00
Marie Píchová 3218c12807 HTTP agnostic loopback server. (#40144) 2020-08-03 13:11:52 +02:00
Anirudh Agnihotry 621ed57461 Correcting Mismatch between ref and src (#39741)
* minor formatting

* ref changes
2020-07-30 14:52:46 -07:00
Marie Píchová 7a6ca80bcd Expect 100 Continue Hang (#38774)
Inside sendRequestContentTask recognizes that it's invoked from a timer thread and if request content fails, unblocks SendAsyncCore and eventually propagates the exception from the content to the outside.
Fixes the issue for H2 as well.

Fixes #36717
2020-07-28 16:58:43 +02:00
Viktor Hofer 809a06f451 Remove depprojs in favor of PackageReferences (#35606)
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
2020-07-23 17:20:26 +02:00
5c274f699d Suppress credscan false positives (#38026)
* Suppress initial cred issues

* Another bunch of supresses

* Clean up

* Another bunch of supresses

* Revert to suppression messages

* Clean up

* Apply suggestions from code review

Co-authored-by: Jeremy Barton <[email protected]>

* Revert passwords literals

* Fix suppression justification comment

Co-authored-by: Jan Jahoda <[email protected]>
Co-authored-by: Jeremy Barton <[email protected]>
2020-07-23 11:59:00 +02:00
Adam SitnikandViktor Hofer 52d4d8c057 mark Windows-specific APIs as such (#39265)
* move all OSPlatformAttributes to a single file so they can be easily referenced in < .NET 5 libraries

* Adds System.Runtime.Versioning*Platform* annotation attributes to < .NET 5 builds

* introduce MinimiumSupportedWindowsPlatform

* introduce IsWindowsSpecific setting that adds MinimumOSPlatform attribute for Windows Specific libraries

* mark all Windows-specific libraries as such

* annotate Windows-specific System.Console methods and properites

* annotate Windows-specific DpapiProtectedConfigurationProvider type

* annotate throwing Windows-specific APIs from System.Diagnostics.Process namespace

* annotate throwing Windows-specific APIs from System.IO.MemoryMappedFiles namespace

* annotate Windows-specific APIs from System.IO.Pipes namespace

* the new attributes should support enums

* annotate Windows-specific APIs from HttpListenerTimeoutManager class

* annotate Windows-specific APIs from System.Net.Sockets namespace

* annotate Windows-specific APIs from System.Runtime.InteropServices namespace

* annotate Windows-specific APIs from System.Security.Cryptography.Csp namespace

* annotate Windows-specific APIs from System.Security.Cryptography.X509Certificates namespace

* annotate Windows-specific APIs from System.Threading namespace

* address code review feedback: dont introduce new constants, reuse existing SYSTEM_PRIVATE_CORELIB

* code review: import the namespace, simplify the attribute name

* add missing Socket.DuplicateAndClose and Socket(SocketInformation)

* fix the test name (it does not throw)

* add missing DriveInfo.set_VolumeLabel

* add System.IO.FileSystem File Encrypt and Descrypt methods

* simplify the < .NET 5 check

* enable nullable in explicit way as it's not enabled in all the projects where this file is included

* include platform attributes in projects that ask for it in explicit way

* set IncludePlatformAttributes to true for projects that include files from other projects

* use suggestions from Viktor and Santi

Co-authored-by: Viktor Hofer <[email protected]>
2020-07-17 15:11:50 +02:00
Jose Perez RodriguezandEric StJohn b7c4cb71fe Add NetFramework Configurations to OOB packages (#39099)
* Porting new netfx configurations for packages

* Add Netfx configurations to Microsoft.Extensions and missing System packages

* Making sure net461 configurations build against targeting pack assembly versions

* Undo changes to add netfx configurations on reference projects that don't ship in their package

* Fix issue with M.E.FP.P package by removing NetStandard.Library metapackage dependency

* Fix issues with depending on higher version than the one available in net461

* Disable UTF8String verifyClosure on package

* Undo changes to Microsoft.XmlSerializer.Generator

* Update src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Microsoft.Extensions.FileProviders.Physical.csproj

Co-authored-by: Eric StJohn <[email protected]>

Co-authored-by: Eric StJohn <[email protected]>
2020-07-14 21:59:55 -07:00
Alexander Nikolaev 10af8ed6a8 WinHttpHandler multiple HTTP/2 connections test is skipped on older Windows (#39266)
Fixes #39258
2020-07-14 16:12:58 +02:00
Alexander Nikolaev 7b2364312f WinHttpHandler supports multiple HTTP/2 connections per server (#38758)
New property EnableMultipleHttp2Connections on WinHttpHandler enables multiple HTTP/2 connection to the same server.

Contributes to #35088
2020-07-13 11:44:42 +02:00
Stephen Toub b39c698c62 Delete NetEventSource.Enter/Exit events (#38874)
They're super verbose, very inconsistent, costly, and not helpful (they appear to be trying to provide tracing of the full flow of calls, but they fail to do even that).
2020-07-10 09:31:21 -04:00
Eric Erhardt 98eee0587d Trim NetEventSource when EventSource.IsSupported is false (#38828)
* Trim NetEventSource when EventSource.IsSupported is false

Follow up to #38129. NetEventSource code was still left in even when EventSource.IsSupported is false, since all the usages of NetEventSource are keying off its own static property: NetEventSource.IsEnabled.

Remove NetEventSource.IsEnabled so the linker can trim NetEventSource code when EventSource.IsSupported is false.

* Remove HttpTelemetry.IsEnabled static property so the linker can trim EventSource code when EventSource.IsSupported is false.

* Fix fake NetEventSource to match what is in the product.
2020-07-09 14:12:44 -04:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Stephen Toub ed78fadab6 Fix CA1805 for unnecessary initialization of fields (#38410)
This has three primary benefits:
1. In some cases, in particular for static fields where other static fields have non-default initialization, the C# compiler can't elide the default initialization, resulting in more IL.
2. It highlights places where the field is otherwise unused and can be deleted, but where the presence of the initialization was silencing the C# compiler's warnings about the unused field.
3. It increases consistency and decreases maintenance / code size / etc.
2020-06-26 07:52:35 -04:00
Stephen Toub 581155b084 Annotate System.Net.Http.WinHttpHandler for nullable reference types (#37502) 2020-06-05 20:54:01 -04:00
Marie Píchová 21e8298bfd Moved NoWriteNoSeekStreamContent to WinHttpHandler. (#35898) 2020-05-06 20:06:19 +02:00
Anirudh Agnihotry 0ac72ac366 Remove TargetsNet* from the runtime repo (#35589)
* feedbacl from previous time

* remove TargetsNet* from ItemGroup

* removing targetFramework from .targets
2020-05-04 17:12:23 +02:00
Eric Erhardt 0764d8c117 Set charset in editorconfig for .csproj (#35634)
* Add editorconfig charset for csproj files.

This stops VS from inserting a BOM in these files.

* Removing BOM from .csproj files.
2020-04-30 09:54:26 -05:00
Anirudh Agnihotry 4c4b2635ed Remove Targets* instances from .props files (#35353)
* remove TargetsNetfx from isPartialFacadeAssembly property

* Omit Resources corrected

* fix partial facade

* GeneratePlatformNotSupportedAssemblyMessage corrected

* OmitResources made similar to isPartialFacadeAssembly

* fixes omitsources

* moving targetFramework dependent properties to second property Group

* fix GeneratePlatformNotSupportedAssemblyWithGlobalPrefix

* correct define constants

* fix no warn

* fix assembly version

* fix packageTargetFramework

* fix the build

* src and ref intell working

* remove targets properties from tests file

* adding comment
2020-04-28 13:36:53 -07:00
Marcus Turewicz 890fab0a64 Use attribute Link syntax for Common files (#35436)
* Change <Link>...</Link> to Link="..."

* Format existing Link="..."
2020-04-25 05:26:50 -07:00
Maxim Lipnin ab6e225d0c [mono] Remove CoreFX.issues_windows.rsp file (#32592)
Changes:
- enabled `runtime (Libraries Test Run release mono Windows_NT x64 Debug)` CI lane (Windows Nano Server CI leg is disabled);
- enabled the tests that pass;
- marked failing test assemblies/classes/methods with `ActiveIssue` attribute using respective GH issues;
- removed CoreFX.issues_windows.rsp file and related mono rsp arguments.

Fixes #1980
2020-04-10 12:41:57 +02:00
Viktor Hofer d0dc66bc0b Rename CoreFx.Private.TestUtilities and reference it in slns (#34656)
* Rename CoreFx.Private.TestUtilities to TestUtilities

* Add TestUtilities reference to slns
2020-04-08 01:26:53 +02:00
Viktor Hofer 42183b1b86 Enable restore for ref and src projects in libs (#33553)
- Use RestoreUseStaticGraphEvaluation which improves no-op restore by 10-15x down to 10-20 seconds.
- .builds msbuild files renamed to .proj as RestoreUseStaticGraphEvaluation throws for non .proj files without an env var set.
- Introducing subsets for libraries and mono and replacing -buildtests switch which was only working for libraries in favor of the subset switch -subset tests which works consistently.
- Fixing the Microsoft.DotNet.CodeAnalysis analyzer which wasn't running and adding missing exclusions.
- Separating restore and build phases in different parts in the repo (ie for installer.tasks) as generated props and targets need to be imported which requires a reevaluation in the build phase.
- Fix eng/docker/build-docker-sdk.ps1 by using the official build entrypoints (cc @alnikola)
- Remove a few depprojs in favor of project restore (faster restore :))
- Fix root code coverage measurement not working correctly
- Traversal support instead of dir.traversal.targets or manual build target defines.
- Introduce a root Build.proj entrypoint which is responsible for building and restoring the repository. This is necessary to enable the new NuGet fast restore which works best and fastest with a single entrypoint.
- Avoid binclashes in libraries and between libraries and installer (netstandard.depproj vs netstandard.csproj)
- Upgrading the SDK to 5.0 latest
- Code cleanup
2020-04-06 11:54:10 +02:00
Jan Kotas 479067315a .NET Core to .NET branding changes (#33694)
Contributes to #33680
2020-03-28 07:00:19 -07:00
Marie PíchováandStephen Toub 02b0f8dd56 Disable all PlatformHandlerTest_Cookies_Http2 for WinHttpHandler. (#34119)
* Disable all PlatformHandlerTest_Cookies_Http2 for WinHttpHandler.

* Added ActiveIssue note.

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

Co-authored-by: Stephen Toub <[email protected]>
2020-03-26 15:07:23 +01:00
Alexander Nikolaev 1d018ba7e9 UseClientCertOnHttp2_OSSupportsIt_Success requires Win10 build number not less than 19573 (#34063)
Fixes #34010
2020-03-25 16:21:37 +01:00
Stephen Toub c39af4fc45 Disable UseClientCertOnHttp2_OSSupportsIt_Success test (#34028) 2020-03-24 22:22:17 -04:00
Alexander Nikolaev 188243a1ec Enable HTTP/2 client cert authentication in WinHttpHandler (#33158)
Pre-release WinHTTP's version supports client cert authentication over HTTP/2, but the feature must be explicitly opted-in. PR sets WINHTTP_OPTION_ENABLE_HTTP2_PLUS_CLIENT_CERT to TRUE before invoking WinHttpConnect if the request's protocol is HTTP/2 and scheme is HTTPS.

This PR also enables all HTTP 1.1 tests for WinHttpHandler on .Net Core and Framework and the most of HTTP/2 tests on .Net Core.
2020-03-19 15:37:00 +01:00