diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-06-17 15:10:02 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-06-18 23:18:50 +0200 |
commit | f1e580b1a14f980bf001662c74b0382e644850be (patch) | |
tree | 44706914b7b1e864307be6d7e36f503c6e8b5946 /wsgitools/scgi/__init__.py | |
parent | a41066b413489b407b9d99174af697563ad680b9 (diff) | |
download | wsgitools-f1e580b1a14f980bf001662c74b0382e644850be.tar.gz |
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.
Diffstat (limited to 'wsgitools/scgi/__init__.py')
-rw-r--r-- | wsgitools/scgi/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |