{ "id": "63205", "key": "TIMOB-2573", "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": "11232", "name": "Release 1.5.1 M01", "archived": true, "released": true, "releaseDate": "2010-12-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:29.000+0000", "created": "2011-04-15T03:23:08.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:29.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}
This is actually due to a compromise in order to reduce memory\nissues due to recursive XHR call chains, as we intentionally\njettison the request holding the internal data. This will be fixed\nin the great XHR refactor.
\nTo recreate:
\n\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.onload = function(e){\n Ti.API.info('onload');\n Ti.API.info(xhr.location);\n // Ti.API.info(xhr.responseText);\n};\nxhr.onerror = function(e){\n Ti.API.info('onerror');\n // Ti.API.info(xhr.responseText);\n};\nxhr.open('GET','http://www.motorsport-total.com/f1/live/htdocs/ticker.php');\nxhr.send();
\n
\nExpected result:
\n\n[INFO] test/1.0 (1.5.1_9819ce0_13122010.9819ce0)\n[INFO] onload\n[INFO] http://www.motorsport-total.com/f1/live/htdocs/ticker.php?strecken_id=19&event_id=7&kunde=default
\n
\nActual result:
\n\n[INFO] test/1.0 (1.5.1_9819ce0_13122010.9819ce0)\n[INFO] onload\n[INFO] <null>
\n
\nWorkaround:
\nUse this.location and this.responseText.
\nCredit to Tamas Daniel for the sample code.
Nope, location still gets jettisoned.
\nthis.responseText works.
\n\nvar xhr = Titanium.Network.createHTTPClient();\n\nxhr.onload = function(e){\n Ti.API.info('onload');\n Ti.API.info(this.location);\n // Ti.API.info(this.responseText);\n};\n\nxhr.onerror = function(e){\n Ti.API.info('onerror');\n // Ti.API.info(this.responseText);\n};\n\nxhr.open('GET','http://www.motorsport-total.com/f1/live/htdocs/ticker.php');\nxhr.send();
\n
is #2450 related?
Has to be part of the XHR refactor. Our canned HTTP client\nresponses do not include location.
What do you mean it does not have \"location?\" Sure it does, I'm\nusing it.
Stephen , I can confirm that the build with githash=188468e puts\nthe location in place. Thanks.
Thank you for testing this, I had initially misidentified it as\na different bug. Tested myself and confirmed the fix.
Made the 1.5.1 release. Moving to the milestone it was fixed in\nand marking it resolved by #2450