Revert "Iter body lines to avoid binary false positives."

This reverts commit b92a3a6d95.
This commit is contained in:
Jakub Roztocil 2012-08-16 03:06:48 +02:00
parent b92a3a6d95
commit a5522b8233

View File

@ -262,10 +262,10 @@ class BufferedPrettyStream(PrettyStream):
# Read the whole body before prettifying it,
# but bail out immediately if the body is binary.
body = bytearray()
for chunk, lf in self.msg.iter_lines(self.CHUNK_SIZE):
for chunk in self.msg.iter_body(self.CHUNK_SIZE):
if b'\0' in chunk:
raise BinarySuppressedError()
body.extend(chunk + lf)
body.extend(chunk)
yield self._process_body(body)