Skip to content

Commit

Permalink
Do not rely on sendfile sending requested count
Browse files Browse the repository at this point in the history
  • Loading branch information
tilgovi committed Nov 29, 2015
1 parent 7dcfc51 commit 123e0a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gunicorn/http/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def sendfile(self, respiter):
sockno = self.sock.fileno()
sent = 0

for m in range(0, nbytes, BLKSIZE):
while sent != nbytes:
count = min(nbytes - sent, BLKSIZE)
sent += sendfile(sockno, fileno, offset + sent, count)

Expand Down

0 comments on commit 123e0a5

Please sign in to comment.