summaryrefslogtreecommitdiffhomepage
path: root/test/python/legacy_force/asgi.py
blob: 56c7061df56fcf3f63c85b25d866e25bcbb04d1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def application(scope, receive=None, send=None):
    assert scope['type'] == 'http'

    if receive is None and send is None:
        return app_http

    return app_http(receive, send)


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