Skip to content

Commit bbf99c1

Browse files
committed
Dont error out if Content-Type is missing (fixes #153)
1 parent bf39bb0 commit bbf99c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def process_response(self, request, response):
111111
)
112112
response.cookies = cookies
113113
if response.status_code == 200 and 'gzip' not in response.get('Content-Encoding', '') and \
114-
response['Content-Type'].split(';')[0] in _HTML_TYPES:
114+
response.get('Content-Type', '').split(';')[0] in _HTML_TYPES:
115115
for panel in toolbar.panels:
116116
panel.process_response(request, response)
117117
response.content = replace_insensitive(

0 commit comments

Comments
 (0)