From b30b9f710558a6ae1ce353b59547b872c679c2a0 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Fri, 31 Aug 2018 21:20:06 -0600 Subject: Set wsgi.input_terminated in the WSGI environ This is a no-op because Waitress already buffers the entire request if it is chunked and will correctly set the CONTENT_LENGTH, but it may allow optimizations in certain WSGI applications/libraries. --- waitress/task.py | 1 + 1 file changed, 1 insertion(+) diff --git a/waitress/task.py b/waitress/task.py index 4cfd9f8..d4a44da 100644 --- a/waitress/task.py +++ b/waitress/task.py @@ -536,6 +536,7 @@ class WSGITask(Task): environ['wsgi.run_once'] = False environ['wsgi.input'] = request.get_body_stream() environ['wsgi.file_wrapper'] = ReadOnlyFileBasedBuffer + environ['wsgi.input_terminated'] = True # wsgi.input is EOF terminated self.environ = environ return environ -- cgit v1.2.1