From 688054e4d25a7cae92f282e45f94041f5ee3d415 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Tue, 25 Jun 2019 08:53:14 -0700 Subject: [PATCH] Remove HttpUtlities from the public API surface (#11539) --- ...tCore.Server.Kestrel.Core.netcoreapp3.0.cs | 23 ------------------- .../Infrastructure/HttpUtilities.Generated.cs | 2 +- .../Internal/Infrastructure/HttpUtilities.cs | 2 +- .../HttpUtilities/HttpUtilities.cs | 2 +- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs index 64277f5f9d..bdcd739d6d 100644 --- a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs +++ b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs @@ -240,29 +240,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http void OnStartLine(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion version, System.Span target, System.Span path, System.Span query, System.Span customMethod, bool pathEncoded); } } -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure -{ - public static partial class HttpUtilities - { - public const string Http10Version = "HTTP/1.0"; - public const string Http11Version = "HTTP/1.1"; - public const string Http2Version = "HTTP/2"; - public const string HttpsUriScheme = "https://"; - public const string HttpUriScheme = "http://"; - public static string GetAsciiOrUTF8StringNonNullCharacters(this System.Span span) { throw null; } - public static string GetAsciiStringEscaped(this System.Span span, int maxChars) { throw null; } - public static string GetAsciiStringNonNullCharacters(this System.Span span) { throw null; } - public static string GetHeaderName(this System.Span span) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownHttpScheme(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpScheme knownScheme) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownMethod(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, out int length) { throw null; } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod GetKnownMethod(string value) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownVersion(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion knownVersion, out byte length) { throw null; } - public static bool IsHostHeaderValid(string hostText) { throw null; } - public static string MethodToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method) { throw null; } - public static string SchemeToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpScheme scheme) { throw null; } - public static string VersionToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion httpVersion) { throw null; } - } -} namespace Microsoft.AspNetCore.Server.Kestrel.Https { public enum ClientCertificateMode diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs index 1dd2e252c2..89443f3de0 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static partial class HttpUtilities + internal static partial class HttpUtilities { // readonly primitive statics can be Jit'd to consts https://github.com/dotnet/coreclr/issues/1079 private static readonly ulong _httpConnectMethodLong = GetAsciiStringAsLong("CONNECT "); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs index 5c266d85df..3f3013aeab 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static partial class HttpUtilities + internal static partial class HttpUtilities { public const string Http10Version = "HTTP/1.0"; public const string Http11Version = "HTTP/1.1"; diff --git a/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs b/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs index 3b040a2648..f3fb605517 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs +++ b/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs @@ -69,7 +69,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure {{ - public static partial class HttpUtilities + internal static partial class HttpUtilities {{ // readonly primitive statics can be Jit'd to consts https://github.com/dotnet/coreclr/issues/1079 {0}