summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi/__init__.py')
-rw-r--r--wsgitools/scgi/__init__.py3
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