{ "id": "111037", "key": "TIMOB-13031", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15274", "description": "2013 Sprint 06 API", "name": "2013 Sprint 06 API", "archived": true, "released": true, "releaseDate": "2013-03-25" }, { "id": "14816", "description": "2013 Sprint 06", "name": "2013 Sprint 06", "archived": true, "released": true, "releaseDate": "2013-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-20T22:56:46.000+0000", "created": "2013-03-12T06:50:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "exalture", "mobilesdk", "qe-devCheck", "titanium" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2013-04-01T23:42:51.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Using HTTP client with Titanium produces different behavior.\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n\ttitle:'Window 1',\r\n\tbackgroundColor:'#000'\r\n});\r\n\r\n\r\nvar videoID = 'AO2GwKAfEqY';\r\n\r\nvdrld = function(a, b) {// We do not get the video-id nor do we get any url; that is, we extract the ID from the image-url.\r\n\tvdldr = Ti.Network.createHTTPClient();\r\n\r\n\tvdldr.onload = function() {\r\n\t\tvar x, y;\r\n\t\tTi.API.error(\"################# onLoad ## ###################\" + \" \"+ this.responseText);\r\n\t\tx = decodeURIComponent(decodeURIComponent(decodeURIComponent(decodeURIComponent(this.responseText.substring(4, this.responseText.length)))));\r\n\t\tTi.API.debug('vdrld: Resulting JSON was: ' + JSON.stringify(x));\r\n\t\ty = JSON.parse(x).content.video[\"fmt_stream_map\"][0].url;\r\n\t\t\r\n\t\t//Ti.API.error(y);\r\n\t\talert(y);\r\n\t\t//Ti.API.error(x);\r\n\t\talert(x);\r\n\t\t\r\n\t\tif (y === undefined) {\r\n\t\t\tTi.API.error(\"vdrld: Found no fmt_stream_map in the returned JSON!!!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\treturn b(y);\r\n\t};\r\n\t\r\n\tvdldr.setRequestHeader(\"Referer\", \"http://www.youtube.com/watch?v=\" + a);\r\n\tvdldr.setRequestHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14\");\r\n\tvdldr.open(\"GET\", \"http://m.youtube.com/watch?ajax=1&feature=related&layout=mobile&tsp=1&&v=\" + a);\r\n\tvdldr.send()\r\n};\r\n\r\nsetTimeout(function() {\r\n\tvdrld(videoID, function() {\r\n\t\tTi.API.debug('The resulting URL from vdrld was: ' + arguments[0]);\r\n\t\tvar videoPlayerParms = {\r\n\t\t\tfullscreen: false,\r\n\t\t\ttop: 5,\r\n\t\t\twidth: 320,\r\n\t\t\theight: 240,\r\n\t\t\tborderColor: '#aaa',\r\n\t\t\tautoplay: true,\r\n\t\t\tmediaControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,\r\n\t\t\tscalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\r\n\t\t\turl: arguments[0],\r\n\t\t};\r\n\t\tvar videoPlayer = Ti.Media.createVideoPlayer(videoPlayerParms);\r\n\t\twin1.add(videoPlayer);\r\n\t});\r\n}, 5000);\r\n\r\nwin1.open();\r\n\r\n{code}\r\n\r\n*Above is working in iOS but giving error in android*\r\n\r\n*Error Message: setRequest Header can only be called before invoking send*\r\n\r\nit seems like behavior is not similar in iOS and Android, as i change the order of setRequestHeader method and open method then it works on both but if i try the same code then it does not show error in iOS but in Android it produces the error message mentioned above.", "attachment": [], "flagged": false, "summary": "Android: Allow HTTPClient.setRequestHeader() to be called after open()", "creator": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium Mobile SDK, Android.", "comment": { "comments": [ { "id": "241746", "author": { "name": "kwcoffman", "key": "kwcoffman", "displayName": "Kevin Coffman", "active": true, "timeZone": "America/New_York" }, "body": "Here is the patch to fix this:\r\n{code}\r\n diff --git a/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java b/android/modules/network/src/java/ti/modules/titanium/network/TiHT\r\n index 372a2c5..793924d 100644\r\n --- a/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java\r\n +++ b/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java\r\n @@ -736,7 +736,7 @@ public class TiHTTPClient\r\n \r\n public void setRequestHeader(String header, String value)\r\n {\r\n - if (readyState == READY_STATE_OPENED) {\r\n + if (readyState <= READY_STATE_OPENED) {\r\n headers.put(header, value);\r\n \r\n } else {\r\n{code}", "updateAuthor": { "name": "kwcoffman", "key": "kwcoffman", "displayName": "Kevin Coffman", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-12T13:42:25.000+0000", "updated": "2013-03-12T13:42:25.000+0000" }, { "id": "241976", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/3962", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-13T15:41:35.000+0000", "updated": "2013-03-13T15:41:35.000+0000" }, { "id": "245080", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with\r\nmobile sdk-3.1.0.v20130401102449\r\nTitanium Studio, build: 3.1.0.201304010847\r\nDevice: HTC Amaze, Android 4.0.3\r\n\r\nThere was this in the logs:\r\n{code}\r\nE/TiAPI (10272): ################# onLoad ## ################### )]}'{\"build_id\": 1364794790, \"build_signature\": \"en:900821,900823,900824,901802,902000,906383,906836,908529,910223,915101,919373,919512,920201,923019,926400,929602,929903,930101,930603,930803,930807,931202,931203,931401,932000\", \"signed_in_username\": \"\", \"result\": \"ok\", \"content\": {\"video\": {\"public_name\": \"UMHealthSystem\", \"longform\": false, \"hq_stream_url\": \"\", \"length_seconds\": 151, \"encrypted_id\": \"AO2GwKAfEqY\", \"description\": \"Dr. Michael Sabel from the University of Michigan Multidisciplinary Melanoma Clinic talks about melanoma and the importance of skin cancer self-exam especially for those who are at a high risk for skin cancer. Dr. Sabel introduces the University of Michigan's new Mobile App: UMSkinCheck which helps you complete a self-exam. For more information visit: www.uofmhealth.org\\/umskincheck\", \"watch_link\": \"\\/watch?v=AO2GwKAfEqY\", \"player_type\": \"rtsp\", \"playability\": \"PLAY_OK\", \"profile_url\": \"\\/user\\/UMHealthSystem\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/AO2GwKAfEqY\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=GSHLS-pOgF89vQ6_hl86j1QeTf0\", \"likes_num\": 3, \"stream_url\": \"rtsp:\\/\\/v3.cache5.c.youtube.com\\/CjYLENy73wIaLQmmEh-gwIbtABMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYJHYrZSDxICtUQw=\\/0\\/0\\/0\\/video.3gp\", \"comment_count\": 4, \"dislikes_num\": 1, \"thumbnail_info\": null, \"title\": \"Introducing UMSkinCheck, a Mobile Skin Check App from the University of Michigan\", \"duration\": \"2:31\", \"view_count\": \"2,620\", \"time_created_text\": \"May 17, 2012\", \"user_image_url\": \"\\/\\/i3.ytimg.com\\/i\\/fp5MBK2IC90Bdm5IQUJvYw\\/1.jpg?v=712528\"}, \"next_url\": \"\\/results?search=related\\u0026q=\\u0026p=2\\u0026ps=12\\u0026v=AO2GwKAfEqY\", \"related_videos\": [{\"public_name\": \"SkinDiseaseEducation\", \"encrypted_id\": \"8PjWDz4FVgM\", \"watch_link\": \"\\/watch?feature=fvwrel\\u0026v=8PjWDz4FVgM\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/8PjWDz4FVgM\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=yfo4NxjHGGpLeArFmipdSjI_uOI\", \"related_feature\": \"fvwrel\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,--EpUAsphkw,fDwigwLwd5A,QEugrDsfj3E,TdSToUqzZ3E,CEZYXcrvvAA,Y-FPQiYXTmM\\u0026w=120\\u0026h=72\\u0026sigh=K8fdpb_I8txlQnhAKRh76g7Qok0\", \"thumb_height\": 72, \"height\": 1040, \"stitched\": 1, \"width\": 128, \"posx\": 0, \"posy\": 0}, \"title\": \"Skin Cancer Cutaneous T-cell Lymphoma Treatment\", \"duration\": \"2:51\", \"view_count\": \"2,916\"}, {\"public_name\": \"UMHealthSystem\", \"encrypted_id\": \"L7e4app0Azo\", \"watch_link\": \"\\/watch?feature=relmfu\\u0026v=L7e4app0Azo\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/L7e4app0Azo\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=u7b6vYzegq-jVZSF9ltp8AFRWbY\", \"related_feature\": \"relmfu\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,--EpUAsphkw,fDwigwLwd5A,QEugrDsfj3E,TdSToUqzZ3E,CEZYXcrvvAA,Y-FPQiYXTmM\\u0026w=120\\u0026h=72\\u0026sigh=K8fdpb_I8txlQnhAKRh76g7Qok0\", \"thumb_height\": 72, \"height\": 1040, \"stitched\": 1, \"width\": 128, \"posx\": 0, \"posy\": 80}, \"title\": \"Match Day 2013\", \"duration\": \"2:41\", \"view_count\": \"4,219\"}, {\"public_name\": \"UMHealthSystem\", \"encrypted_id\": \"0w2Lo_nYRPs\", \"watch_link\": \"\\/watch?feature=relmfu\\u0026v=0w2Lo_nYRPs\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/0w2Lo_nYRPs\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=-pq48K-Vkbjd48VQ49gszuOlogY\", \"related_feature\": \"relmfu\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,--EpUAsphkw,fDwigwLwd5A,QEugrDsfj3E,TdSToUqzZ3E,CEZYXcrvvAA,Y-FPQiYXTmM\\u0026w=120\\u0026h=72\\u0026sigh=K8fdpb_I8txlQnhAKRh76g7Qok0\", \"thumb_height\": 72, \"height\": 1040, \"stitched\": 1, \"width\": 128, \"posx\": 0, \"posy\": 160}, \"title\": \"Lung Transplant Education\", \"duration\": \"59\r\nD/TiAPI (10272): vdrld: Resulting JSON was: \"{\\\"build_id\\\": 1364794790, \\\"build_signature\\\": \\\"en:900821,900823,900824,901802,902000,906383,906836,908529,910223,915101,919373,919512,920201,923019,926400,929602,929903,930101,930603,930803,930807,931202,931203,931401,932000\\\", \\\"signed_in_username\\\": \\\"\\\", \\\"result\\\": \\\"ok\\\", \\\"content\\\": {\\\"video\\\": {\\\"public_name\\\": \\\"UMHealthSystem\\\", \\\"longform\\\": false, \\\"hq_stream_url\\\": \\\"\\\", \\\"length_seconds\\\": 151, \\\"encrypted_id\\\": \\\"AO2GwKAfEqY\\\", \\\"description\\\": \\\"Dr. Michael Sabel from the University of Michigan Multidisciplinary Melanoma Clinic talks about melanoma and the importance of skin cancer self-exam especially for those who are at a high risk for skin cancer. Dr. Sabel introduces the University of Michigan's new Mobile App: UMSkinCheck which helps you complete a self-exam. For more information visit: www.uofmhealth.org\\\\/umskincheck\\\", \\\"watch_link\\\": \\\"\\\\/watch?v=AO2GwKAfEqY\\\", \\\"player_type\\\": \\\"rtsp\\\", \\\"playability\\\": \\\"PLAY_OK\\\", \\\"profile_url\\\": \\\"\\\\/user\\\\/UMHealthSystem\\\", \\\"thumbnail_for_watch\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vi\\\\/AO2GwKAfEqY\\\\/hqdefault.jpg?w=320\\\\u0026h=192\\\\u0026sigh=GSHLS-pOgF89vQ6_hl86j1QeTf0\\\", \\\"likes_num\\\": 3, \\\"stream_url\\\": \\\"rtsp:\\\\/\\\\/v3.cache5.c.youtube.com\\\\/CjYLENy73wIaLQmmEh-gwIbtABMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYJHYrZSDxICtUQw=\\\\/0\\\\/0\\\\/0\\\\/video.3gp\\\", \\\"comment_count\\\": 4, \\\"dislikes_num\\\": 1, \\\"thumbnail_info\\\": null, \\\"title\\\": \\\"Introducing UMSkinCheck, a Mobile Skin Check App from the University of Michigan\\\", \\\"duration\\\": \\\"2:31\\\", \\\"view_count\\\": \\\"2,620\\\", \\\"time_created_text\\\": \\\"May 17, 2012\\\", \\\"user_image_url\\\": \\\"\\\\/\\\\/i3.ytimg.com\\\\/i\\\\/fp5MBK2IC90Bdm5IQUJvYw\\\\/1.jpg?v=712528\\\"}, \\\"next_url\\\": \\\"\\\\/results?search=related\\\\u0026q=\\\\u0026p=2\\\\u0026ps=12\\\\u0026v=AO2GwKAfEqY\\\", \\\"related_videos\\\": [{\\\"public_name\\\": \\\"SkinDiseaseEducation\\\", \\\"encrypted_id\\\": \\\"8PjWDz4FVgM\\\", \\\"watch_link\\\": \\\"\\\\/watch?feature=fvwrel\\\\u0026v=8PjWDz4FVgM\\\", \\\"playability\\\": \\\"NO_PREFETCH\\\", \\\"thumbnail_for_watch\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vi\\\\/8PjWDz4FVgM\\\\/hqdefault.jpg?w=320\\\\u0026h=192\\\\u0026sigh=yfo4NxjHGGpLeArFmipdSjI_uOI\\\", \\\"related_feature\\\": \\\"fvwrel\\\", \\\"thumbnail_info\\\": {\\\"thumb_width\\\": 120, \\\"url\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,--EpUAsphkw,fDwigwLwd5A,QEugrDsfj3E,TdSToUqzZ3E,CEZYXcrvvAA,Y-FPQiYXTmM\\\\u0026w=120\\\\u0026h=72\\\\u0026sigh=K8fdpb_I8txlQnhAKRh76g7Qok0\\\", \\\"thumb_height\\\": 72, \\\"height\\\": 1040, \\\"stitched\\\": 1, \\\"width\\\": 128, \\\"posx\\\": 0, \\\"posy\\\": 0}, \\\"title\\\": \\\"Skin Cancer Cutaneous T-cell Lymphoma Treatment\\\", \\\"duration\\\": \\\"2:51\\\", \\\"view_count\\\": \\\"2,916\\\"}, {\\\"public_name\\\": \\\"UMHealthSystem\\\", \\\"encrypted_id\\\": \\\"L7e4app0Azo\\\", \\\"watch_link\\\": \\\"\\\\/watch?feature=relmfu\\\\u0026v=L7e4app0Azo\\\", \\\"playability\\\": \\\"NO_PREFETCH\\\", \\\"thumbnail_for_watch\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vi\\\\/L7e4app0Azo\\\\/hqdefault.jpg?w=320\\\\u0026h=192\\\\u0026sigh=u7b6vYzegq-jVZSF9ltp8AFRWbY\\\", \\\"related_feature\\\": \\\"relmfu\\\", \\\"thumbnail_info\\\": {\\\"thumb_width\\\": 120, \\\"url\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,--EpUAsphkw,fDwigwLwd5A,QEugrDsfj3E,TdSToUqzZ3E,CEZYXcrvvAA,Y-FPQiYXTmM\\\\u0026w=120\\\\u0026h=72\\\\u0026sigh=K8fdpb_I8txlQnhAKRh76g7Qok0\\\", \\\"thumb_height\\\": 72, \\\"height\\\": 1040, \\\"stitched\\\": 1, \\\"width\\\": 128, \\\"posx\\\": 0, \\\"posy\\\": 80}, \\\"title\\\": \\\"Match Day 2013\\\", \\\"duration\\\": \\\"2:41\\\", \\\"view_count\\\": \\\"4,219\\\"}, {\\\"public_name\\\": \\\"UMHealthSystem\\\", \\\"encrypted_id\\\": \\\"0w2Lo_nYRPs\\\", \\\"watch_link\\\": \\\"\\\\/watch?feature=relmfu\\\\u0026v=0w2Lo_nYRPs\\\", \\\"playability\\\": \\\"NO_PREFETCH\\\", \\\"thumbnail_for_watch\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vi\\\\/0w2Lo_nYRPs\\\\/hqdefault.jpg?w=320\\\\u0026h=192\\\\u0026sigh=-pq48K-Vkbjd48VQ49gszuOlogY\\\", \\\"related_feature\\\": \\\"relmfu\\\", \\\"thumbnail_info\\\": {\\\"thumb_width\\\": 120, \\\"url\\\": \\\"http:\\\\/\\\\/i.ytimg.com\\\\/vt?cids=8PjWDz4FVgM,L7e4app0Azo,0w2Lo_nYRPs,1xVsO9MyRC4,CtdLOvju_FU,D6mHxyLguhQ,ZHHdAaV-P10,-\r\nE/V8Exception(10272): Exception occurred at app.js:22: Uncaught TypeError: Cannot read property '0' of undefined\r\nE/XMLModule(10272): (KrollRuntimeThread) [7447,7447] Error parsing XML\r\nE/XMLModule(10272): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{\"build_id\":...@1:12497 in java.io.InputStreamReader@40ed0eb8) \r\nE/XMLModule(10272): \tat org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)\r\nE/XMLModule(10272): \tat javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)\r\nE/XMLModule(10272): \tat ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)\r\nE/XMLModule(10272): \tat ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:647)\r\nE/XMLModule(10272): \tat ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:93)\r\nE/XMLModule(10272): \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)\r\nE/XMLModule(10272): \tat org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)\r\nE/XMLModule(10272): \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1057)\r\nE/XMLModule(10272): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/XMLModule(10272): \tat android.os.Looper.loop(Looper.java:154)\r\nE/XMLModule(10272): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\nE/TiHttpClient(10272): (KrollRuntimeThread) [22,7469] Error parsing XML\r\nE/TiHttpClient(10272): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{\"build_id\":...@1:12497 in java.io.InputStreamReader@40ed0eb8) \r\nE/TiHttpClient(10272): \tat org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)\r\nE/TiHttpClient(10272): \tat javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)\r\nE/TiHttpClient(10272): \tat ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)\r\nE/TiHttpClient(10272): \tat ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:647)\r\nE/TiHttpClient(10272): \tat ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:93)\r\nE/TiHttpClient(10272): \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)\r\nE/TiHttpClient(10272): \tat org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)\r\nE/TiHttpClient(10272): \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1057)\r\nE/TiHttpClient(10272): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiHttpClient(10272): \tat android.os.Looper.loop(Looper.java:154)\r\nE/TiHttpClient(10272): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\n{code}\r\n\r\nHowever, since the issue was doing setRequestHeader, and that appears to work, this worked, I guess.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-01T23:39:21.000+0000", "updated": "2013-04-01T23:42:25.000+0000" }, { "id": "245086", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did not complain about request headers.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-01T23:42:51.000+0000", "updated": "2013-04-01T23:42:51.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }