microsoft / reverse-proxy

A toolkit for developing high-performance HTTP reverse proxy applications.
https://microsoft.github.io/reverse-proxy
MIT License
8.61k stars 844 forks source link

Avoid an async state machine allocation from CopyResponseBodyAsync #2586

Closed MihaZupan closed 3 months ago

MihaZupan commented 3 months ago

There's no reason for this to be a separate helper anymore, the edge case it was handling doesn't exist anymore since .NET 5. We can inline it and save the allocation.