mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Solving issue #2692
ValueError: count must be a positive integer (got 0)
This commit is contained in:
parent
933b210f2e
commit
7d8f68c1a7
@ -371,8 +371,8 @@ class Response(object):
|
||||
if self.is_chunked():
|
||||
chunk_size = "%X\r\n" % nbytes
|
||||
self.sock.sendall(chunk_size.encode('utf-8'))
|
||||
|
||||
self.sock.sendfile(respiter.filelike, count=nbytes)
|
||||
if nbytes > 0:
|
||||
self.sock.sendfile(respiter.filelike, count=nbytes)
|
||||
|
||||
if self.is_chunked():
|
||||
self.sock.sendall(b"\r\n")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user