summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wsgitools/applications.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wsgitools/applications.py b/wsgitools/applications.py
index 33823bd..f90e395 100644
--- a/wsgitools/applications.py
+++ b/wsgitools/applications.py
@@ -127,6 +127,9 @@ class StaticFile:
stream.close()
return []
+ if isinstance(self.filelike, basestring) and 'wsgi.file_wrapper' in environ:
+ return environ['wsgi.file_wrapper'](stream, self.blocksize)
+
if 0 <= size <= self.blocksize:
data = stream.read(size)
if isinstance(self.filelike, basestring):