Skip to content

Commit 50b1bda

Browse files
committed
start
1 parent 24d6241 commit 50b1bda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Benchmarks/Middleware/MiddlewareHelpers.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public static async Task RenderFortunesHtml(IEnumerable<Fortune> model, HttpCont
3838
httpContext.Response.StatusCode = StatusCodes.Status200OK;
3939
httpContext.Response.ContentType = "text/html; charset=UTF-8";
4040

41-
Encoding.UTF8.GetBytes("<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>", httpContext.Response.BodyWriter);
41+
await httpContext.Response.StartAsync();
42+
43+
Encoding.UTF8.GetBytes(
44+
"<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>",
45+
httpContext.Response.BodyWriter);
4246

4347
foreach (var item in model)
4448
{

0 commit comments

Comments
 (0)