From 2dc5694ecd1bd95e9091f6942657ebe1da6e0bb7 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Wed, 17 Apr 2019 04:29:47 +0100 Subject: [PATCH] Http1OutputProducer Reset sequentially (#9203) --- .../Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs index 7e1aca76e1..58297f2979 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs @@ -481,10 +481,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { Debug.Assert(_currentSegmentOwner == null); Debug.Assert(_completedSegments == null || _completedSegments.Count == 0); - _autoChunk = false; - _startCalled = false; - _currentChunkMemoryUpdated = false; + // Cleared in sequential address ascending order _currentMemoryPrefixBytes = 0; + _autoChunk = false; + _currentChunkMemoryUpdated = false; + _startCalled = false; } private ValueTask WriteAsync(