diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 6ca3b4fb7..c0569834b 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -353,7 +353,9 @@ def sendfile(self, respiter): if self.cfg.is_ssl or not self.can_sendfile(): return False - if not util.has_fileno(respiter.filelike): + if util.has_fileno(respiter.filelike): + fileno = respiter.filelike.fileno() + else: return False try: