Handling change file message in libunit.

This is required for proper log file rotation action.
This commit is contained in:
Max Romanov
2020-03-30 14:18:41 +03:00
parent 82b899b136
commit ab7b42a072
3 changed files with 11 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ def application(environ, start_response):
content_length = int(environ.get('CONTENT_LENGTH', 0))
body = bytes(environ['wsgi.input'].read(content_length))
environ['wsgi.errors'].write(body)
environ['wsgi.errors'].write(body.decode())
environ['wsgi.errors'].flush()
start_response('200', [('Content-Length', '0')])