{ "id": "61151", "key": "TIMOB-519", "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": "11229", "name": "Release 1.5.0 M04", "archived": true, "released": true, "releaseDate": "2010-12-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:22.000+0000", "created": "2011-04-15T02:30:51.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "iphone", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:22.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}

\nhttp://support.appcelerator.net/discussions/support/1990-getrespons...

\n

looks like this.responseHeader isn't getting correctly\ndispatched through this pointer proxy.

{html}", "attachment": [], "flagged": false, "summary": "problem with this in callbacks for XHR", "creator": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123451", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sample code to reproduce:

\n
\nvar client = Titanium.Network.createHTTPClient();\nclient.onload = function() {\n    Titanium.API.info(\"Loaded! Status: \" + this.status);\n\n    var contentType = this.getResponseHeader('Content-Type');\n    Titanium.API.info(\"Content-Type: \" + contentType);\n};\nclient.open(\"GET\", \"http://example.com/\");\nclient.send();\n
\n

got on iphone:
\n[INFO] Loaded! Status: 200 [INFO] Content-Type: null <- BROKEN

\n

got on android:
\nI/TiAPI (11249): (kroll$1) [23,606] Loaded! Status: 200
\nI/TiAPI (11249): (kroll$1) [13,619] Content-Type: text/html;\ncharset=UTF-8 <- fine

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:52.000+0000", "updated": "2011-04-15T02:30:52.000+0000" }, { "id": "123452", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Several related issues also mentioned on \nhttps://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:53.000+0000", "updated": "2011-04-15T02:30:53.000+0000" }, { "id": "123453", "author": { "name": "jakehowerton", "key": "jakehowerton", "displayName": "Jake Howerton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Isn't this somewhat critical? Does anyone have a patch for\nit?

{html}", "updateAuthor": { "name": "jakehowerton", "key": "jakehowerton", "displayName": "Jake Howerton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:53.000+0000", "updated": "2011-04-15T02:30:53.000+0000" }, { "id": "123454", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [074c3e8c9cd6bc80af9ca53256a23ba24d1e09dc])\n[#519\nstate:fixed-in-qa] Set response headers correctly in HTTP response.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/074c3e8c9cd6...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:54.000+0000", "updated": "2011-04-15T02:30:54.000+0000" }, { "id": "123455", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Just checked the sample code provided by Brion Vibber against\n1.5 on simulator with the following address:
\nhttp://developer.appcelerator.com/apidoc/mobile/1.4/api.json

\n

The console returs:
\n[INFO] Loaded! Status: 200 [INFO] Content-Type: text/json

\n

Ticket resolved

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:54.000+0000", "updated": "2011-04-15T02:30:54.000+0000" }, { "id": "123456", "author": { "name": "conrad", "key": "conrad", "displayName": "Conrad", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Using mobile sdk 1.6.1 and iOS (any version), this problem\npersists depending on which version of Apache is running on the\nserver. Is there any way to collect the raw headers and parse them\nmyself? I believe getAllHeaders is not supported in iOS still.

{html}", "updateAuthor": { "name": "conrad", "key": "conrad", "displayName": "Conrad", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:30:55.000+0000", "updated": "2011-04-15T02:30:55.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }