React to runtime/594 Encoder.Convert change (#17747)
This commit is contained in:
parent
6ec28e8715
commit
ad8ecf96a1
|
|
@ -133,7 +133,8 @@ namespace Microsoft.AspNetCore.Http
|
|||
// Therefore, we check encodedLength - totalBytesUsed too.
|
||||
while (!completed || encodedLength - totalBytesUsed != 0)
|
||||
{
|
||||
encoder.Convert(source, destination, flush: source.Length == 0, out var charsUsed, out var bytesUsed, out completed);
|
||||
// 'text' is a complete string, the converter should always flush its buffer.
|
||||
encoder.Convert(source, destination, flush: true, out var charsUsed, out var bytesUsed, out completed);
|
||||
totalBytesUsed += bytesUsed;
|
||||
|
||||
writer.Advance(bytesUsed);
|
||||
|
|
|
|||
Loading…
Reference in New Issue