{ "id": "60792", "key": "TIMOB-160", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:52:11.000+0000", "created": "2011-04-15T02:24:30.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "response", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-15T22:18: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

When handling a response in HTTPClient's onreadystatechange\nhandler function, the client object's status and statusText\nproperties do not appear to be populated. Change the following\nlines in the XHR test in the Kitchen Sink to reproduce quickly:

\n
\n    var c = Titanium.Network.createHTTPClient();\n\n// set on ready state change function\nc.onreadystatechange = function()\n{\n    Titanium.API.debug('>>>>>>>>>>>>>>>>>>>>>>>> readyState = ' + this.readyState);\n    Titanium.API.debug('>>>>>>>>>>>>>>>>>>>>>>>> status = ' + this.status);\n    Titanium.API.debug('>>>>>>>>>>>>>>>>>>>>>>>> statusText = ' + this.statusText);\n    if (this.readyState == 4)\n    {\n\n        document.getElementById('html').innerHTML = this.responseText;\n    }\n};\n// open the client\nc.open('GET','http://www.google.com');\n\n// send the data\nc.send();\n
{html}", "attachment": [], "flagged": false, "summary": "iPhone - status and statusText not working on HTTPClient object", "creator": { "name": "kevinwhinnery", "key": "kevinwhinnery", "displayName": "kevinwhinnery", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "122852", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

yeah, we need to make sure to fully implement the XHR spec.

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:24:31.000+0000", "updated": "2011-04-15T02:24:31.000+0000" }, { "id": "122853", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Even now on 1.4.2 XHR spec doesn't appear to be fully\nimplemented yet.

\n

status never gets 404, 303 and other HTTP status codes other\nthan 200.

\n

also statusText never gets populated.

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:24:31.000+0000", "updated": "2011-04-15T02:24:31.000+0000" }, { "id": "122854", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

All properties which we still support (do not support\nstatusText; separate bug dealing with XHR compliance, already\nfiled) work properly.

\n

Tested against 1.6.0 RC1

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:24:31.000+0000", "updated": "2011-04-15T02:24:31.000+0000" }, { "id": "130819", "author": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "body": "rollback wrong update", "updateAuthor": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "created": "2011-04-15T07:52:44.000+0000", "updated": "2011-04-15T07:52:44.000+0000" }, { "id": "133673", "author": { "name": "mrandrey", "key": "mrandrey", "displayName": "Andrey", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on 1.6.2 -- 200 & 406 work, 401 gets absolutely no response, not even a status with the code number.", "updateAuthor": { "name": "mrandrey", "key": "mrandrey", "displayName": "Andrey", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-15T22:18:51.000+0000", "updated": "2011-05-15T22:18:51.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }