diff --git a/pywss/__init__.py b/pywss/__init__.py index db574e8..5a40b89 100644 --- a/pywss/__init__.py +++ b/pywss/__init__.py @@ -338,10 +338,7 @@ def __flush_body(self): elif isinstance(body, str): self.fd.sendall(body.encode()) elif isinstance(body, BufferedReader): - chunk = body.read(8192) - while chunk: - self.fd.sendall(chunk) - chunk = body.read(8192) + self.fd.sendfile(body) body.close() def __str__(self):