diff --git a/tests/app/xhr/xhr-tests.ts b/tests/app/xhr/xhr-tests.ts index 15e4fe2fc..f5a8dca8d 100644 --- a/tests/app/xhr/xhr-tests.ts +++ b/tests/app/xhr/xhr-tests.ts @@ -383,3 +383,10 @@ export function test_getResponseHeader() { TKUnit.assertEqual(xhr.getResponseHeader("Content-Type"), "application/json"); }; + +export function test_soap_content_types_recognized_as_text() { + const xhr = new XMLHttpRequest(); + + TKUnit.assertTrue(xhr.isTextContentType("text/xml"), "text/xml failed to be recognized as a text response type"); + TKUnit.assertTrue(xhr.isTextContentType("application/xml"), "application/xml failed to be recognized as a text response type"); +}; \ No newline at end of file diff --git a/tns-core-modules/xhr/xhr.ts b/tns-core-modules/xhr/xhr.ts index 2beeaa1c5..8f5255447 100644 --- a/tns-core-modules/xhr/xhr.ts +++ b/tns-core-modules/xhr/xhr.ts @@ -131,7 +131,8 @@ export class XMLHttpRequest { private textTypes: string[] = [ 'text/plain', 'application/xml', - 'text/html' + 'text/html', + 'text/xml' ]; private isTextContentType(contentType: string): boolean {