diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs index 6acb332a26..ceb017ad28 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs @@ -77,22 +77,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http } } - protected void ThrowHeadersReadOnlyException() + protected static void ThrowHeadersReadOnlyException() { throw new InvalidOperationException(CoreStrings.HeadersAreReadOnly); } - protected void ThrowArgumentException() + protected static void ThrowArgumentException() { throw new ArgumentException(); } - protected void ThrowKeyNotFoundException() + protected static void ThrowKeyNotFoundException() { throw new KeyNotFoundException(); } - protected void ThrowDuplicateKeyException() + protected static void ThrowDuplicateKeyException() { throw new ArgumentException(CoreStrings.KeyAlreadyExists); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs index 3309701e0a..72bedf1be6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs @@ -1204,7 +1204,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http statusCode != StatusCodes.Status304NotModified; } - private void ThrowResponseAlreadyStartedException(string value) + private static void ThrowResponseAlreadyStartedException(string value) { throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value)); }