Files
nginx-unit/test/python/legacy/asgi.py
Max Romanov 5fd2933d2e Python: supporting ASGI legacy protocol.
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-10 22:27:08 +03:00

14 lines
272 B
Python

def application(scope):
assert scope['type'] == 'http'
return app_http
async def app_http(receive, send):
await send({
'type': 'http.response.start',
'status': 200,
'headers': [
(b'content-length', b'0'),
]
})