diff options
| author | David Cramer | 2011-05-09 23:59:50 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-05-09 23:59:55 -0700 | 
| commit | bbf99c1639bfec6d2edc4473f8adb278970db7a5 (patch) | |
| tree | 458cfcc32d2d31ea54a6538aaae0d8b0ff2b0af9 | |
| parent | bf39bb03a0777505f1fbca2d05f31db4aef37a46 (diff) | |
| download | django-debug-toolbar-bbf99c1639bfec6d2edc4473f8adb278970db7a5.tar.bz2 | |
Dont error out if Content-Type is missing (fixes #153)
| -rw-r--r-- | debug_toolbar/middleware.py | 2 | 
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( | 
