{ "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.

\n

To 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
\n

Expected 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
\n

Actual result:

\n
\n[INFO] test/1.0 (1.5.1_9819ce0_13122010.9819ce0)\n[INFO] onload\n[INFO] <null>\n
\n

Workaround:

\n

Use this.location and this.responseText.

\n

Credit to Tamas Daniel for the sample code.

{html}", "attachment": [], "flagged": false, "summary": "HttpClient drops properties while doing a callback", "creator": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128810", "author": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I would like us to also review two related tickets and\ndiscuss:
\n#519\n#1502

\n

~ralf

{html}", "updateAuthor": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:08.000+0000", "updated": "2011-04-15T03:23:08.000+0000" }, { "id": "128811", "author": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Nope, location still gets jettisoned.

\n

this.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
{html}", "updateAuthor": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:09.000+0000", "updated": "2011-04-15T03:23:09.000+0000" }, { "id": "128812", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

is #2450 related?

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:09.000+0000", "updated": "2011-04-15T03:23:09.000+0000" }, { "id": "128813", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Has to be part of the XHR refactor. Our canned HTTP client\nresponses do not include location.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:09.000+0000", "updated": "2011-04-15T03:23:09.000+0000" }, { "id": "128814", "author": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

What do you mean it does not have \"location?\" Sure it does, I'm\nusing it.

{html}", "updateAuthor": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:09.000+0000", "updated": "2011-04-15T03:23:09.000+0000" }, { "id": "128815", "author": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Stephen , I can confirm that the build with githash=188468e puts\nthe location in place. Thanks.

{html}", "updateAuthor": { "name": "tamasdaniel", "key": "tamasdaniel", "displayName": "Tamas Daniel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:10.000+0000", "updated": "2011-04-15T03:23:10.000+0000" }, { "id": "128816", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thank you for testing this, I had initially misidentified it as\na different bug. Tested myself and confirmed the fix.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:10.000+0000", "updated": "2011-04-15T03:23:10.000+0000" }, { "id": "128817", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Made the 1.5.1 release. Moving to the milestone it was fixed in\nand marking it resolved by #2450

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:10.000+0000", "updated": "2011-04-15T03:23:10.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }