{ "id": "93285", "key": "TIMOB-9558", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13417", "description": "Sprint 2012-13 API", "name": "Sprint 2012-13 API", "archived": true, "released": true, "releaseDate": "2012-07-01" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-26T10:11:19.000+0000", "created": "2012-06-14T16:24:07.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_xml", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "19505", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "98325", "key": "TIMOB-10234", "fields": { "summary": "iOS: Platform > XHR > File Download: 'Large File Download' after downloading file leads to crash.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:02:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nXHR calls fail if the response data has invalid encoding \r\n\r\nh2. Steps to reproduce and sample code\r\nRun the sample code using the url provided in the bug comments below\r\nResult: responseText it's null\r\n\r\nThis behavior it's only reproducible with the provided url page. \r\nThe page it's recognized from the browser as encoded with Western (ISO-8859-1). Encoding it with Unicode (UTF-8) would solve the issue and response text it's returned as expected.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle:'test',\r\n\tbackgroundColor:'white'\r\n});\r\n\r\nvar xhr = Titanium.Network.createHTTPClient({\r\n\tenableKeepAlive: true,\t\r\n});\r\n\r\nxhr.onerror = function(e) {\r\n Ti.API.error('#### Error received while requesting intraday data: ' + JSON.stringify(e));\r\n};\r\n\r\nxhr.onreadystatechange = function(e) {\r\n\tTi.API.info(\"#### \" + this.readyState);\r\n};\r\n\r\nxhr.onload = function(e) {\r\n if(this.status == 200) {\r\n Ti.API.info('#### response text: ' + this.responseText);\r\n }\r\n};\r\nxhr.open('GET', \"SEE COMMENT FOR URLs\");\r\nxhr.send();\r\n\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: XHR calls fail if the response data has invalid encoding", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK tested: 2.1 latest CI - 2.0 GA\r\niOS 5", "comment": { "comments": [ { "id": "202980", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2546 against 2_1_X", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-12T11:51:38.000+0000", "updated": "2012-07-12T11:51:38.000+0000" }, { "id": "207970", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Response data shown for the XHR call. Verified on:\r\nTitanium Studio: 2.1.1.201207161421\r\nTitanium SDK: 2.1.1.v2012071618060\r\niOS: iPhone simulator 5.0", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T23:14:34.000+0000", "updated": "2012-07-16T23:14:34.000+0000" }, { "id": "283468", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5039\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T06:02:38.000+0000", "updated": "2013-12-10T06:02:38.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }