mirror of
https://github.com/django/daphne.git
synced 2025-07-27 15:39:46 +03:00
Add ['asgi']['version'] = '3.0' when 3.0 is used.
This commit is contained in:
parent
9d3259e7b8
commit
220c07b260
|
@ -22,6 +22,8 @@ class ASGI3Middleware:
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
def __call__(self, scope):
|
def __call__(self, scope):
|
||||||
|
scope.setdefault("asgi", {})
|
||||||
|
scope["asgi"]["version"] = "3.0"
|
||||||
return functools.partial(self.asgi, scope=scope)
|
return functools.partial(self.asgi, scope=scope)
|
||||||
|
|
||||||
async def asgi(self, receive, send, scope):
|
async def asgi(self, receive, send, scope):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user