Skip to content

Commit 2d0062d

Browse files
committed
Revert "React to runtime/594 Encoder.Convert change (#17747)"
This reverts commit ad8ecf9.
1 parent 6a2f28e commit 2d0062d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Http/Http.Abstractions/src/Extensions/HttpResponseWritingExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ private static void WriteMultiSegmentEncoded(PipeWriter writer, string text, Enc
133133
// Therefore, we check encodedLength - totalBytesUsed too.
134134
while (!completed || encodedLength - totalBytesUsed != 0)
135135
{
136-
// 'text' is a complete string, the converter should always flush its buffer.
137-
encoder.Convert(source, destination, flush: true, out var charsUsed, out var bytesUsed, out completed);
136+
encoder.Convert(source, destination, flush: source.Length == 0, out var charsUsed, out var bytesUsed, out completed);
138137
totalBytesUsed += bytesUsed;
139138

140139
writer.Advance(bytesUsed);

0 commit comments

Comments
 (0)