Merge pull request #1969 from benoitc/wsgi_input_terminated

handle `wsgi.input_terminated` extension
This commit is contained in:
Benoit Chesneau 2019-04-29 13:58:05 +02:00 committed by GitHub
commit cf8ac37ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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('-', '_')