diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs index b691d3c5c14da..e2b46f2bb89ed 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs @@ -125,16 +125,6 @@ private MsQuicApi(NativeApi* vtable) static MsQuicApi() { - if (!IsHttp3Enabled()) - { - if (NetEventSource.Log.IsEnabled()) - { - NetEventSource.Info(null, $"HTTP/3 and QUIC is not enabled, see 'System.Net.SocketsHttpHandler.Http3Support' AppContext switch."); - } - - return; - } - if (OperatingSystem.IsWindows() && !IsWindowsVersionSupported()) { if (NetEventSource.Log.IsEnabled()) @@ -171,34 +161,6 @@ static MsQuicApi() } } - // Note that this is copy-pasted from S.N.Http just to hide S.N.Quic behind the same AppContext switch - // since this library is considered "private" for 6.0. - // We should get rid of this once S.N.Quic API surface is officially exposed. - private static bool IsHttp3Enabled() - { - bool value; - - // First check for the AppContext switch, giving it priority over the environment variable. - if (AppContext.TryGetSwitch("System.Net.SocketsHttpHandler.Http3Support", out value)) - { - return value; - } - - // AppContext switch wasn't used. Check the environment variable. - string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP3SUPPORT"); - - if (bool.TryParse(envVar, out value)) - { - return value; - } - else if (uint.TryParse(envVar, out uint intVal)) - { - return intVal != 0; - } - - return false; - } - private static bool IsWindowsVersionSupported() => OperatingSystem.IsWindowsVersionAtLeast(MinWindowsVersion.Major, MinWindowsVersion.Minor, MinWindowsVersion.Build, MinWindowsVersion.Revision); diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj b/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj index 583b2b6c4861e..2a17894a5555a 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj @@ -4,9 +4,6 @@ true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix - - -