Fix a bug when content-type is empty

This commit is contained in:
Josselin Jacquard
2011-08-30 12:04:48 +02:00
parent 35fc3b4dbb
commit 1ecb593c7b
+2
View File
@@ -150,6 +150,8 @@ def get_encoding_from_headers(headers):
"""
content_type = headers.get('content-type')
if not content_type :
return
content_type, params = cgi.parse_header(content_type)
if 'charset' in params: