{ "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...
\nlooks like this.responseHeader isn't getting correctly\ndispatched through this pointer proxy.
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
\ngot on iphone:
\n[INFO] Loaded! Status: 200 [INFO] Content-Type: null <- BROKEN
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
Several related issues also mentioned on \nhttps://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...
Isn't this somewhat critical? Does anyone have a patch for\nit?
(from [074c3e8c9cd6bc80af9ca53256a23ba24d1e09dc])\n[#519\nstate:fixed-in-qa] Set response headers correctly in HTTP response.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/074c3e8c9cd6...
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
The console returs:
\n[INFO] Loaded! Status: 200 [INFO] Content-Type: text/json
Ticket resolved
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.