Fix dispatcher when there is no content-type in response
This commit is contained in:
parent
65fecdb4d4
commit
22c69221c1
|
@ -170,7 +170,7 @@ class Dispatcher(object):
|
|||
# Calling hook function
|
||||
for hook in self.req_mapping['on_response']:
|
||||
content_type = response.headers.getheader('content-type')
|
||||
if hook.has_key('content-types'):
|
||||
if hook.has_key('content-types') and content_type:
|
||||
if content_type.split(';')[0] not in hook['content-types']:
|
||||
logger.debug("Don't load filter %s (content-type %s doesn't match)" % (hook['filter'], content_type))
|
||||
continue
|
||||
|
|
Reference in New Issue