Python: supporting ASGI legacy protocol.
Introducing manual protocol selection for 'universal' apps and frameworks.
This commit is contained in:
13
test/python/legacy/asgi.py
Normal file
13
test/python/legacy/asgi.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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'),
|
||||
]
|
||||
})
|
||||
Reference in New Issue
Block a user