handle wsgi.input_terminated extension

fix #1653
This commit is contained in:
Benoit Chesneau 2019-01-24 15:34:20 +01:00
parent 7af6f651c0
commit e5141a1c5a

View File

@ -73,6 +73,7 @@ def base_environ(cfg):
"wsgi.multiprocess": (cfg.workers > 1), "wsgi.multiprocess": (cfg.workers > 1),
"wsgi.run_once": False, "wsgi.run_once": False,
"wsgi.file_wrapper": FileWrapper, "wsgi.file_wrapper": FileWrapper,
"wsgi.input_terminated": True,
"SERVER_SOFTWARE": SERVER_SOFTWARE, "SERVER_SOFTWARE": SERVER_SOFTWARE,
} }
@ -130,6 +131,7 @@ def create(req, sock, client, server, cfg):
continue continue
elif hdr_name == "CONTENT-LENGTH": elif hdr_name == "CONTENT-LENGTH":
environ['CONTENT_LENGTH'] = hdr_value environ['CONTENT_LENGTH'] = hdr_value
environ['wsgi.input_terminated'] = False
continue continue
key = 'HTTP_' + hdr_name.replace('-', '_') key = 'HTTP_' + hdr_name.replace('-', '_')