mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
make sure we write at the end. fix 002-test-request.test_011 . spotted
by jbergstroem on irc. thanks!
This commit is contained in:
parent
49d340ce2b
commit
87d3c4b3e7
@ -44,6 +44,7 @@ class TeeInput(object):
|
||||
if self._is_socket:
|
||||
pos = self.tmp.tell()
|
||||
while True:
|
||||
self.tmp.seek(self._tmp_size())
|
||||
if not self._tee(CHUNK_SIZE):
|
||||
break
|
||||
self.tmp.seek(pos)
|
||||
@ -54,6 +55,7 @@ class TeeInput(object):
|
||||
if self._is_socket:
|
||||
pos = self.tmp.tell()
|
||||
while True:
|
||||
self.tmp.seek(self._tmp_size())
|
||||
if not self._tee(CHUNK_SIZE):
|
||||
break
|
||||
self.tmp.seek(pos)
|
||||
@ -137,6 +139,9 @@ class TeeInput(object):
|
||||
if chunk:
|
||||
self.tmp.write(chunk)
|
||||
self.tmp.seek(0, os.SEEK_END)
|
||||
self.tmp.flush()
|
||||
if hasattr(self.tmp, 'fileno'):
|
||||
os.fsync(self.tmp.fileno())
|
||||
return chunk
|
||||
|
||||
if self.parser.body_eof():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user