diff options
Diffstat (limited to 'heatclient/common')
-rw-r--r-- | heatclient/common/http.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py index f5c5021..4b765df 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -221,10 +221,10 @@ class HTTPClient(object): raise exc.CommunicationError(message=message) self.log_http_response(resp) - + txt_content = encodeutils.safe_decode(resp.content, 'utf-8') if not ('X-Auth-Key' in kwargs['headers']) and ( resp.status_code == 401 or - (resp.status_code == 500 and "(HTTP 401)" in resp.content)): + (resp.status_code == 500 and "(HTTP 401)" in txt_content)): raise exc.HTTPUnauthorized(_("Authentication failed: %s") % resp.content) elif 400 <= resp.status_code < 600: |