Files
nginx-unit/test/python/user_group/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

25 lines
406 B
Python

import json
import os
def application(environ, start_response):
uid = os.geteuid()
gid = os.getegid()
out = json.dumps(
{
'UID': uid,
'GID': gid,
}
).encode('utf-8')
start_response(
'200 OK',
[
('Content-Length', str(len(out))),
('Content-Type', 'application/json'),
],
)
return [out]