From e045ca6bd83f160881690d654590e6f9ba71ade9 Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Wed, 1 Aug 2012 23:51:30 +0200 Subject: [PATCH] Cleanup, CHANGELOG --- README.rst | 1 + httpie/core.py | 5 ++--- httpie/models.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 475f1fe563..40ba0c797e 100644 --- a/README.rst +++ b/README.rst @@ -375,6 +375,7 @@ Changelog * `0.2.7dev`_ * Support for efficient large file downloads. * Response body is fetched only when needed (e.g., not with ``--headers``). + * Improved content type matching. * Updated Solarized color scheme. * Windows: Added ``--output FILE`` to store output into a file (piping results into corrupted data on Windows). diff --git a/httpie/core.py b/httpie/core.py index 43382f4e09..b00d896e47 100644 --- a/httpie/core.py +++ b/httpie/core.py @@ -85,7 +85,6 @@ def output_stream(args, env, request, response): """ - exchange = [] prettifier = (OutputProcessor(env, pygments_style=args.style) if args.prettify else None) @@ -105,8 +104,8 @@ def output_stream(args, env, request, response): for chunk in request_iter: yield chunk - if with_response: - yield b'\n\n\n' + if with_request and with_response: + yield b'\n\n\n' if with_response: response_iter = formatted_stream( diff --git a/httpie/models.py b/httpie/models.py index 316a46fc35..17f3aaeffa 100644 --- a/httpie/models.py +++ b/httpie/models.py @@ -58,7 +58,7 @@ class HTTPResponse(HTTPMessage): """A `requests.models.Response` wrapper.""" def __iter__(self): - mb = 1024 * 1000 + mb = 1024 * 1024 return self._orig.iter_content(chunk_size=2 * mb) @property