diff options
Diffstat (limited to '')
-rw-r--r-- | test/python/server_port/asgi.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/python/server_port/asgi.py b/test/python/server_port/asgi.py new file mode 100644 index 00000000..e79ced00 --- /dev/null +++ b/test/python/server_port/asgi.py @@ -0,0 +1,11 @@ +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()), + ] + }) |