Skip to content

Commit 5e1363a

Browse files
authored
Fix sync write in SampleMiddleware
1 parent 36590ac commit 5e1363a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Middleware/CORS/samples/SampleDestination/SampleMiddleware.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ public Task Invoke(HttpContext context)
2525

2626
context.Response.ContentType = "text/plain; charset=utf-8";
2727
context.Response.ContentLength = content.Length;
28-
context.Response.Body.Write(content, 0, content.Length);
29-
30-
return Task.CompletedTask;
28+
return context.Response.Body.WriteAsync(content, 0, content.Length);
3129
}
3230
}
3331
}

0 commit comments

Comments
 (0)