diff --git a/sanic/app.py b/sanic/app.py index c801cd3d..6861bca0 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -775,6 +775,14 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta): if request.stream: response = request.stream.response if isinstance(response, BaseHTTPResponse): + await self.dispatch( + "http.lifecycle.response", + inline=True, + context={ + "request": request, + "response": response, + }, + ) await response.send(end_stream=True) else: raise ServerError(