Skip to content

Commit

Permalink
add application/xml.* as non-binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Viner committed Jan 6, 2017
1 parent 6671e5d commit 2bafddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions gabbi/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class BinaryTypesTest(unittest.TestCase):
'application/javascript',
'application/json',
'application/json-home',
'application/xml',
]

def test_not_binary(self):
Expand Down
3 changes: 2 additions & 1 deletion gabbi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 2bafddf

Please sign in to comment.