Fix prettify if no content type is applied.

This can happen some time e.g some unauthorized responses do not have any content type
This commit is contained in:
Christopher Grebs 2012-02-28 14:25:00 +01:00
parent b0cebd68a1
commit 686d6c0181

View File

@ -35,6 +35,9 @@ def prettify_http(headers):
def prettify_body(content, content_type):
if not content_type:
return content
content_type = content_type.split(';')[0]
if 'json' in content_type:
content_type = TYPE_JS