Passing environment: null as part of the POST request results in an internal server error. The problem is in asgi.run():
@app.route("/<path:command>", methods=["POST"])
async def run(command: str):
# <snip>
# This fails for environment=None, because that will be passed to _exec() instead of an empty dict.
env = params.get("environment", {})
result = await _exec(argv, streams, env)
# <snip>
An explicit value of null should be handled the same as if environment is missing. As a workaround, clients must ensure that they do not pass an explicit null for environment.
Passing
environment: null
as part of the POST request results in an internal server error. The problem is inasgi.run()
:An explicit value of
null
should be handled the same as ifenvironment
is missing. As a workaround, clients must ensure that they do not pass an explicitnull
forenvironment
.