From 85d883456bd4b4e10d34b7881067deab5f429b2f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Mon, 17 Apr 2017 00:37:40 -0700 Subject: [PATCH] Remove Reset from IHttpParser (#1700) * Remove Reset from IHttpParser - The parser isn't stateful and doesn't need it --- .../Internal/Http/Frame.cs | 3 --- .../Internal/Http/HttpParser.cs | 4 ---- .../Internal/Http/IHttpParser.cs | 2 -- 3 files changed, 9 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/Frame.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/Frame.cs index 775fed6858..de575684a9 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/Frame.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/Frame.cs @@ -407,9 +407,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http _requestHeadersParsed = 0; _responseBytesWritten = 0; - - // When testing parser can be null - _parser.Reset(); } /// diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/HttpParser.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/HttpParser.cs index 43a7d94990..ba8c0260e5 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/HttpParser.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/HttpParser.cs @@ -491,9 +491,5 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http Log.IsEnabled(LogLevel.Information) ? new Span(detail, length).GetAsciiStringEscaped(Constants.MaxExceptionDetailSize) : string.Empty); - - public void Reset() - { - } } } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/IHttpParser.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/IHttpParser.cs index 46dfc1b34b..54cdf8e92e 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/IHttpParser.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/Internal/Http/IHttpParser.cs @@ -10,7 +10,5 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http bool ParseRequestLine(TRequestHandler handler, ReadableBuffer buffer, out ReadCursor consumed, out ReadCursor examined); bool ParseHeaders(TRequestHandler handler, ReadableBuffer buffer, out ReadCursor consumed, out ReadCursor examined, out int consumedBytes); - - void Reset(); } } \ No newline at end of file