mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix sendfile behaviour for open files with non-zero offset.
This commit is contained in:
parent
ff58e0c6da
commit
f639128bd7
@ -372,7 +372,7 @@ class Response(object):
|
||||
chunk_size = "%X\r\n" % nbytes
|
||||
self.sock.sendall(chunk_size.encode('utf-8'))
|
||||
|
||||
self.sock.sendfile(respiter.filelike, count=nbytes)
|
||||
self.sock.sendfile(respiter.filelike, offset=offset, count=nbytes)
|
||||
|
||||
if self.is_chunked():
|
||||
self.sock.sendall(b"\r\n")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user