There was an error while loading. Please reload this page.
2 parents 053e15c + 7d8f68c commit 0b953b8Copy full SHA for 0b953b8
gunicorn/http/wsgi.py
@@ -371,8 +371,8 @@ def sendfile(self, respiter):
371
if self.is_chunked():
372
chunk_size = "%X\r\n" % nbytes
373
self.sock.sendall(chunk_size.encode('utf-8'))
374
-
375
- self.sock.sendfile(respiter.filelike, count=nbytes)
+ if nbytes > 0:
+ self.sock.sendfile(respiter.filelike, count=nbytes)
376
377
378
self.sock.sendall(b"\r\n")
0 commit comments