diff --git a/src/flask_debugtoolbar/__init__.py b/src/flask_debugtoolbar/__init__.py index 0e11dd0..bc827d0 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(response.charset) else: response_html = response.data.decode(response.charset) @@ -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)