aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/middleware.py
diff options
context:
space:
mode:
authorDavid Cramer2011-05-09 23:59:50 -0700
committerDavid Cramer2011-05-09 23:59:55 -0700
commitbbf99c1639bfec6d2edc4473f8adb278970db7a5 (patch)
tree458cfcc32d2d31ea54a6538aaae0d8b0ff2b0af9 /debug_toolbar/middleware.py
parentbf39bb03a0777505f1fbca2d05f31db4aef37a46 (diff)
downloaddjango-debug-toolbar-bbf99c1639bfec6d2edc4473f8adb278970db7a5.tar.bz2
Dont error out if Content-Type is missing (fixes #153)
Diffstat (limited to 'debug_toolbar/middleware.py')
-rw-r--r--debug_toolbar/middleware.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py
index be03038..b4619da 100644
--- a/debug_toolbar/middleware.py
+++ b/debug_toolbar/middleware.py
@@ -111,7 +111,7 @@ class DebugToolbarMiddleware(object):
)
response.cookies = cookies
if response.status_code == 200 and 'gzip' not in response.get('Content-Encoding', '') and \
- response['Content-Type'].split(';')[0] in _HTML_TYPES:
+ response.get('Content-Type', '').split(';')[0] in _HTML_TYPES:
for panel in toolbar.panels:
panel.process_response(request, response)
response.content = replace_insensitive(