diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs index bda3e005a8..507f1b1e13 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs @@ -99,11 +99,18 @@ namespace PlatformBenchmarks if (state == State.Headers) { - if (Parser.ParseHeaders(new ParsingAdapter(this), buffer, out consumed, out examined, out int consumedBytes)) + var reader = new SequenceReader(buffer); + if (Parser.ParseHeaders(new ParsingAdapter(this), ref reader)) { + examined = consumed; state = State.Body; } + else + { + examined = buffer.End; + } + consumed = reader.Position; buffer = buffer.Slice(consumed); }