Files
nginx-unit/test/python/environment/wsgi.py
Andrei Zeliankou 5a8337933d Tests: pathlib used where appropriate
Also fixed various pylint errors and style issues.
2024-01-15 15:48:58 +00:00

14 lines
312 B
Python

import os
def application(env, start_response):
variables = env.get('HTTP_X_VARIABLES').split(',')
body = ','.join(
[str(os.environ[var]) for var in variables if var in os.environ]
)
body = body.encode()
start_response('200', [('Content-Length', str(len(body)))])
return body