这个 WSGI 驱动器会输出什么?
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())