diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 1b8b9cc0..32e7a2ac 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -73,6 +73,7 @@ def base_environ(cfg): "wsgi.multiprocess": (cfg.workers > 1), "wsgi.run_once": False, "wsgi.file_wrapper": FileWrapper, + "wsgi.input_terminated": True, "SERVER_SOFTWARE": SERVER_SOFTWARE, } @@ -130,6 +131,7 @@ def create(req, sock, client, server, cfg): continue elif hdr_name == "CONTENT-LENGTH": environ['CONTENT_LENGTH'] = hdr_value + environ['wsgi.input_terminated'] = False continue key = 'HTTP_' + hdr_name.replace('-', '_')