add application/xml.* as non-binary

This commit is contained in:
Tom Viner 2017-01-06 15:29:21 +00:00
parent 6671e5d4d1
commit 2bafddfb09
2 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class BinaryTypesTest(unittest.TestCase):
'application/javascript',
'application/json',
'application/json-home',
'application/xml',
]
def test_not_binary(self):

View File

@ -109,7 +109,8 @@ def not_binary(content_type):
content_type.endswith('+xml') or
content_type.endswith('+json') or
content_type == 'application/javascript' or
content_type.startswith('application/json'))
content_type.startswith('application/json') or
content_type.startswith('application/xml'))
def parse_content_type(content_type, default_charset='utf-8'):