What does this WSGI driver print?

from WSGI and ASGI
Python 3.14 beginner 2 min

What does this WSGI driver print?

Python
def application(environ, start_response):
    body = environ["PATH_INFO"].encode()
    start_response("200 OK", [("Content-Length", str(len(body)))])
    return [body]

captured = []

def start_response(status, headers):
    captured.append(status)

result = application({"PATH_INFO": "/health"}, start_response)
print(captured[0], b"".join(result).decode())
Open in playground
Report an error