{ "id": "62971", "key": "TIMOB-2339", "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": "11230", "name": "Release 1.5.0 M05", "archived": true, "released": true, "releaseDate": "2010-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:49.000+0000", "created": "2011-04-15T03:17:07.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:49.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

ANDROID HTTPCLIENT BUG!
\nSource:\nandroid/modules/network/src/ti/modules/titanium/network/TiHTTPClient.java

\n

In line #625 should be: response object instead\nof request:

\n
\npublic String getAllResponseHeaders() {\n    String result = \"\";\n    if (readyState >= READY_STATE_HEADERS_RECEIVED)\n    {\n        StringBuilder sb = new StringBuilder(1024);\n
\n

*===> Header[] headers = request.getAllHeaders();

\n
\n        int len = headers.length;\n        for(int i = 0; i < len; i++) {\n            Header h = headers[i];\n            sb.append(h.getName()).append(\":\").append(h.getValue()).append(\"\\n\");\n        }\n        result = sb.toString();\n    } else {\n        // Spec says return \"\";\n    }\n\n    return result;\n}\n
{html}", "attachment": [], "flagged": false, "summary": "Android Response Headers BUG", "creator": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128203", "author": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Maybe it should be changed in 1.4.X versions too.
\nThanks

{html}", "updateAuthor": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:17:08.000+0000", "updated": "2011-04-15T03:17:08.000+0000" }, { "id": "128204", "author": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

IOS code is incorrect too!

{html}", "updateAuthor": { "name": "android3000", "key": "android3000", "displayName": "Android3000", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:17:08.000+0000", "updated": "2011-04-15T03:17:08.000+0000" }, { "id": "128205", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

simple failcase app.js. Check logcat and you'll see only request\nheaders are there.

\n
\nvar xhr = Ti.Network.createHTTPClient();\nxhr.onload = function() {\n    Ti.API.info('Response Headers');\n    Ti.API.info(xhr.allResponseHeaders);\n};\nxhr.open('GET', 'http://www.appcelerator.com');\nxhr.send();\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:17:09.000+0000", "updated": "2011-04-15T03:17:09.000+0000" }, { "id": "128206", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [4f2561249677572219e50bfa7483c029da2953fd])\n[#2339 state:fixed-in-qa] getAllResponseHeaders\nwas actually returning request headers \nhttps://github.com/appcelerator/titanium_mobile/commit/4f2561249677...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:17:09.000+0000", "updated": "2011-04-15T03:17:09.000+0000" }, { "id": "128207", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Titanium SDK version: 1.5.0 (12/07/10 10:00 8f4eea3...),\nbugTest, Android 1.6, 2.1

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:17:09.000+0000", "updated": "2011-04-15T03:17:09.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }