From 2348fc238d3f14c0c939b0975752333c311f5c7e Mon Sep 17 00:00:00 2001 From: benoitc Date: Sat, 27 Feb 2010 18:04:04 +0100 Subject: [PATCH] seek after we sync --- gunicorn/http/tee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/http/tee.py b/gunicorn/http/tee.py index 9db05631..af7d995b 100644 --- a/gunicorn/http/tee.py +++ b/gunicorn/http/tee.py @@ -138,10 +138,10 @@ class TeeInput(object): chunk, self.buf = self.parser.filter_body(self.buf) 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()) + self.tmp.seek(0, os.SEEK_END) return chunk if self.parser.body_eof():