From e5141a1c5a44299472abf910a3bd84d7d13b2399 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Thu, 24 Jan 2019 15:34:20 +0100 Subject: [PATCH] handle `wsgi.input_terminated` extension fix #1653 --- gunicorn/http/wsgi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 593c8f24..3694eb9e 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('-', '_')