diff --git a/src/flask_debugtoolbar/__init__.py b/src/flask_debugtoolbar/__init__.py index f02994d..9c59cf5 100644 --- a/src/flask_debugtoolbar/__init__.py +++ b/src/flask_debugtoolbar/__init__.py @@ -230,7 +230,7 @@ def process_response(self, response): response.headers['content-type'].startswith('text/html')): return response - if 'gzip' in response.headers.get('Content-Encoding', ''): + if 'gzip' in response.headers.get('Content-Encoding'): response_html = gzip_decompress(response.data).decode() else: response_html = response.get_data(as_text=True) @@ -258,7 +258,7 @@ def process_response(self, response): content = ''.join((before, toolbar_html, after)) content = content.encode(response.charset) - if 'gzip' in response.headers.get('Content-Encoding', ''): + if 'gzip' in response.headers.get('Content-Encoding'): content = gzip_compress(content) response.response = [content] response.content_length = len(content)