mirror of
https://github.com/httpie/cli.git
synced 2024-12-29 09:49:10 +01:00
Revert "Iter body lines to avoid binary false positives."
This reverts commit b92a3a6d95
.
This commit is contained in:
parent
b92a3a6d95
commit
a5522b8233
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user