From f1e580b1a14f980bf001662c74b0382e644850be Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 17 Jun 2023 15:10:02 +0200 Subject: add a wsgitools.scgi.asyncio module This adds an asyncio implementation of the server side of the SCGI protocol, because asyncore is being deprecated. Unlike the asyncore implementation, this does not yet support sendfile. --- wsgitools/scgi/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wsgitools/scgi/__init__.py') diff --git a/wsgitools/scgi/__init__.py b/wsgitools/scgi/__init__.py index 677e3b5..38a5bef 100644 --- a/wsgitools/scgi/__init__.py +++ b/wsgitools/scgi/__init__.py @@ -65,6 +65,7 @@ def _convert_environ( multithread: bool = False, multiprocess: bool = False, run_once: bool = False, + enable_sendfile: bool = True, ) -> None: environ.update({ "wsgi.version": (1, 0), @@ -79,5 +80,5 @@ def _convert_environ( except KeyError: pass environ.pop("HTTP_CONTENT_LENGTH", None) # TODO: better way? - if have_sendfile: + if have_sendfile and enable_sendfile: environ["wsgi.file_wrapper"] = FileWrapper -- cgit v1.2.3