asgi.py (1626:d20f04158166) asgi.py (1848:4bd548074e2c)
1async def application(scope, receive, send):
2 assert scope['type'] == 'http'
3
1async def application(scope, receive, send):
2 assert scope['type'] == 'http'
3
4 await send({
5 'type': 'http.response.start',
6 'status': 200,
7 'headers': [
8 (b'content-length', b'0'),
9 (b'server-port', str(scope['server'][1]).encode()),
10 ]
11 })
4 await send(
5 {
6 'type': 'http.response.start',
7 'status': 200,
8 'headers': [
9 (b'content-length', b'0'),
10 (b'server-port', str(scope['server'][1]).encode()),
11 ],
12 }
13 )