diff --git a/gunicorn/http/tee.py b/gunicorn/http/tee.py index 57291775..7940968a 100644 --- a/gunicorn/http/tee.py +++ b/gunicorn/http/tee.py @@ -135,6 +135,7 @@ class TeeInput(object): def _tee(self, length): """ fetch partial body""" while True: + print len(self._buf) chunk, self.buf = self.parser.filter_body(self.buf) if chunk: self.tmp.write(chunk) diff --git a/gunicorn/util.py b/gunicorn/util.py index f4f81066..3f3da4fa 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -90,14 +90,7 @@ def close(sock): pass def read_partial(sock, length, buf=None): - if buf is not None: - if len(buf) >= length: - return buf - else: - length = length - len(buf) - - tmp_buf = sock.recv(length) - + tmp_buf = skt.recv(length) if not buf: return tmp_buf