From 220c07b2609dee399c1d9cd8c5edf834a4ca6c36 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 20 Mar 2019 10:28:35 +0000 Subject: [PATCH] Add ['asgi']['version'] = '3.0' when 3.0 is used. --- daphne/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daphne/cli.py b/daphne/cli.py index 7579938..0becb7b 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -22,6 +22,8 @@ class ASGI3Middleware: self.app = app def __call__(self, scope): + scope.setdefault("asgi", {}) + scope["asgi"]["version"] = "3.0" return functools.partial(self.asgi, scope=scope) async def asgi(self, receive, send, scope):