Permalink
Browse files

Iter body lines to avoid binary false positives.

  • Loading branch information...
1 parent 9098e5b commit b92a3a6d955bee01750901572cceae4ea033dc2b @jakubroztocil committed Aug 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 httpie/output.py
View
@@ -262,10 +262,10 @@ def _body(self):
# Read the whole body before prettifying it,
# but bail out immediately if the body is binary.
body = bytearray()
- for chunk in self.msg.iter_body(self.CHUNK_SIZE):
+ for chunk, lf in self.msg.iter_lines(self.CHUNK_SIZE):
if b'\0' in chunk:
raise BinarySuppressedError()
- body.extend(chunk)
+ body.extend(chunk + lf)
yield self._process_body(body)

0 comments on commit b92a3a6

Please sign in to comment.