diff options
author | Vitaly Gridnev <vgridnev@mirantis.com> | 2017-03-07 13:38:22 +0400 |
---|---|---|
committer | Vitaly Gridnev <gridnevvvit@gmail.com> | 2017-03-08 00:50:55 +0400 |
commit | 028c4824d0190e0b605ae9c90756167083e46cd3 (patch) | |
tree | d8a47a3a8633301d59dfc6aea8f70362c73f84ec /swiftclient/client.py | |
parent | 91de5e8a385178b58cfeeb702c005ec2f2c5068a (diff) | |
download | python-swiftclient-028c4824d0190e0b605ae9c90756167083e46cd3.tar.gz |
Fix logging of the gzipped body
Change-Id: I6d7ccbf4ef9b46e890ecec58842c5cdd2804c7a9
Closes-bug: 1670620
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r-- | swiftclient/client.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index 21cbe27..80b6eda 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -32,7 +32,8 @@ import six from swiftclient import version as swiftclient_version from swiftclient.exceptions import ClientException from swiftclient.utils import ( - iter_wrapper, LengthWrapper, ReadableToIterable, parse_api_response) + iter_wrapper, LengthWrapper, ReadableToIterable, parse_api_response, + get_body) # Default is 100, increase to 256 http_client._MAXHEADERS = 256 @@ -165,7 +166,9 @@ def http_log(args, kwargs, resp, body): log_method("RESP STATUS: %s %s", resp.status, resp.reason) log_method("RESP HEADERS: %s", scrub_headers(resp.getheaders())) if body: - log_method("RESP BODY: %s", body) + resp_headers = resp_header_dict(resp) + nbody = get_body(resp_headers, body) + log_method("RESP BODY: %s", nbody) def parse_header_string(data): |