From e1a7a42f96a45742e8a5a6a2ad1a573f0c9ee3ed Mon Sep 17 00:00:00 2001 From: Lukas Elsner Date: Tue, 21 Jul 2020 13:32:53 +0200 Subject: [PATCH] add response headers to scope --- uvicorn/protocols/http/httptools_impl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/uvicorn/protocols/http/httptools_impl.py b/uvicorn/protocols/http/httptools_impl.py index 7a60733ce..ebff26ac8 100644 --- a/uvicorn/protocols/http/httptools_impl.py +++ b/uvicorn/protocols/http/httptools_impl.py @@ -443,6 +443,7 @@ async def send(self, message): status_code = message["status"] headers = self.default_headers + list(message.get("headers", [])) + self.scope["response_headers"] = headers if self.access_log: self.access_logger.info(