We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94b7c9a commit 6a119ccCopy full SHA for 6a119cc
src/Mvc/Mvc.Core/src/ContentResult.cs
@@ -82,17 +82,7 @@ async Task IResult.ExecuteAsync(HttpContext httpContext)
82
if (Content != null)
83
{
84
response.ContentLength = resolvedContentTypeEncoding.GetByteCount(Content);
85
-
86
- await using (var textWriter = new HttpResponseStreamWriter(response.Body, resolvedContentTypeEncoding))
87
- {
88
- await textWriter.WriteAsync(Content);
89
90
- // Flushing the HttpResponseStreamWriter does not flush the underlying stream. This just flushes
91
- // the buffered text in the writer.
92
- // We do this rather than letting dispose handle it because dispose would call Write and we want
93
- // to call WriteAsync.
94
- await textWriter.FlushAsync();
95
- }
+ await response.WriteAsync(Content, resolvedContentTypeEncoding);
96
}
97
98
0 commit comments