You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Proper separation of meta/body
This commit is contained in:
@@ -76,14 +76,11 @@ class BaseStream(metaclass=ABCMeta):
|
||||
yield e.message
|
||||
|
||||
if self.output_options.meta:
|
||||
mixed = self.output_options.headers or self.output_options.body
|
||||
|
||||
if mixed:
|
||||
if self.output_options.body:
|
||||
yield b'\n\n'
|
||||
|
||||
yield self.get_metadata()
|
||||
if not mixed:
|
||||
yield b'\n'
|
||||
yield b'\n\n'
|
||||
|
||||
|
||||
class RawStream(BaseStream):
|
||||
|
@@ -115,7 +115,7 @@ def build_output_stream_for_message(
|
||||
output_options=output_options,
|
||||
**stream_kwargs,
|
||||
)
|
||||
if (env.stdout_isatty and output_options.body
|
||||
if (env.stdout_isatty and output_options.body and not output_options.meta
|
||||
and not getattr(requests_message, 'is_body_upload_chunk', False)):
|
||||
# Ensure a blank line after the response body.
|
||||
# For terminal output only.
|
||||
|
Reference in New Issue
Block a user