{ "id": "95066", "key": "TIMOB-9976", "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": "13574", "description": "Sprint 2012-15 Core", "name": "Sprint 2012-15 Core", "archived": true, "released": true, "releaseDate": "2012-07-30" }, { "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-07-17T15:19:22.000+0000", "created": "2012-07-12T20:22:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "httpclient", "qe-port" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-01-15T13:29:07.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "1. Client make ajax request using HttpClient\r\n2. Server return HTTP error code 4xx (for example 400) with detail error in the response body\r\n\r\nThere is no way to get response body because HttpClient perform abort after receiving error.\r\n\r\nHere is method abort for HttpClient\r\n\r\n{code}\r\nabort: function() {\r\n\r\n var c = this.constants;\r\n c.responseText = c.responseXML = c.responseData = \"\";\r\n this._completed = true;\r\n clearTimeout(this._timeoutTimer);\r\n--------------------- when abort happens this._xhr.reponseText is cleared --------\r\n this.connected && this._xhr.abort();\r\n c.readyState = this.UNSENT;\r\n this._fireStateChange();\r\n\r\n}\r\n{code}\r\nSo before performing abort on xhr, the responseText should be saved.\r\n\r\n", "attachment": [ { "id": "29824", "filename": "app.js", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-17T01:30:32.000+0000", "size": 1748, "mimeType": "application/x-javascript" }, { "id": "29812", "filename": "TC1061.zip", "author": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T15:39:47.000+0000", "size": 2212223, "mimeType": "application/zip" } ], "flagged": false, "summary": "MobileWeb: HttpClient in the MobileWeb drops responseText when error happens", "creator": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Safari 5.1.7", "comment": { "comments": [ { "id": "207800", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Hey Sehyo,\r\n\r\nCan you please provide a small, runnable test case to reproduce this issue? Instead of providing a small part of the code, please provide something that we can run instantly, in order to get your issue resolved asap.\r\n\r\nThanks", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-07-16T13:35:20.000+0000", "updated": "2012-07-16T13:35:20.000+0000" }, { "id": "207856", "author": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attached is sample project", "updateAuthor": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T15:39:47.000+0000", "updated": "2012-07-16T15:39:47.000+0000" }, { "id": "207867", "author": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attached sample project that reproduce the case. Here is instruction how to set up\r\n(1) unzip the project\r\n(2) install nginx. \r\n(3) copy nginx conf from \"/server/nginx.conf\" to nginx installation directory\r\n(4) in the nginx.conf, change \"root\" to point to the /build/mobileweb\r\n(3) install node.js\r\n(4) cd /server\r\n(5) \"node good.js\"\r\n(6) from Studio, run the project as mobileweb. open safari on \"http://localhost:8080\"\r\n(7) click text. It should return string return from node.js server. That shows success is return ok\r\n(8) kill node.js and run \"node bad.js\"\r\n(9) refresh the browser and click text. In this case error message is not return properly.\r\n\r\nUI code is in the \"FirstView.js\"", "updateAuthor": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T15:46:33.000+0000", "updated": "2012-07-16T15:46:33.000+0000" }, { "id": "207871", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Thanks Sehyo,\r\n\r\nI have moved the ticket so that the platform team can look into this issue and fix it.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-07-16T15:49:53.000+0000", "updated": "2012-07-16T15:49:53.000+0000" }, { "id": "207991", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/2582", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-17T01:30:45.000+0000", "updated": "2012-07-17T01:30:45.000+0000" }, { "id": "208739", "author": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you move this to 2.1.1? since this is high priority issue for us", "updateAuthor": { "name": "schang@cymtec.com", "key": "schang@cymtec.com", "displayName": "Sehyo Chang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T14:32:45.000+0000", "updated": "2012-07-20T14:32:45.000+0000" }, { "id": "234437", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed.\nTested and verified with:\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK, build: 3.0.O.GA\niPad mini iOS 6.0 safari\nMacBook Pro 10.8.2 Mountain Lion\nChrome 23.0", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-15T13:28:18.000+0000", "updated": "2013-01-15T13:28:18.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }