{ "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
yeah, we need to make sure to fully implement the XHR spec.
Even now on 1.4.2 XHR spec doesn't appear to be fully\nimplemented yet.
\nstatus never gets 404, 303 and other HTTP status codes other\nthan 200.
\nalso statusText never gets populated.
All properties which we still support (do not support\nstatusText; separate bug dealing with XHR compliance, already\nfiled) work properly.
\nTested against 1.6.0 RC1