From 396c54d8746c0c01a032a9eb25220db72e9ab564 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Wed, 12 Jun 2019 18:44:27 +0100 Subject: [PATCH] Use correct examined (#11124) Merging to unblock benchmarks quickly. --- .../BenchmarkApplication.HttpConnection.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs index 507f1b1e13..556e83066c 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs @@ -100,7 +100,10 @@ namespace PlatformBenchmarks if (state == State.Headers) { var reader = new SequenceReader(buffer); - if (Parser.ParseHeaders(new ParsingAdapter(this), ref reader)) + var success = Parser.ParseHeaders(new ParsingAdapter(this), ref reader); + + consumed = reader.Position; + if (success) { examined = consumed; state = State.Body; @@ -110,7 +113,6 @@ namespace PlatformBenchmarks examined = buffer.End; } - consumed = reader.Position; buffer = buffer.Slice(consumed); }