mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #2687 from vytas7/fix-sendfile-offset
Fix sendfile behaviour for open files with non-zero offset
This commit is contained in:
commit
00de6d9d79
@ -372,7 +372,7 @@ class Response(object):
|
||||
chunk_size = "%X\r\n" % nbytes
|
||||
self.sock.sendall(chunk_size.encode('utf-8'))
|
||||
if nbytes > 0:
|
||||
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