diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 00b8f74fe8..6ca3b4fb7b 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -353,7 +353,7 @@ def sendfile(self, respiter): if self.cfg.is_ssl or not self.can_sendfile(): return False - if not util.is_fileobject(respiter.filelike): + if not util.has_fileno(respiter.filelike): return False try: diff --git a/gunicorn/util.py b/gunicorn/util.py index a8875d90e5..896a22141a 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -510,7 +510,7 @@ def to_bytestring(value, encoding="utf8"): return value.encode(encoding) -def is_fileobject(obj): +def has_fileno(obj): if not hasattr(obj, "fileno"): return False