Files
nginx-unit/test/python/server_port/asgi.py
Andrei Zeliankou 6c97a1a069 Tests: style.
2021-04-05 14:03:05 +01:00

14 lines
344 B
Python

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