{ "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
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
Maybe it should be changed in 1.4.X versions too.
\nThanks
IOS code is incorrect too!
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
(from [4f2561249677572219e50bfa7483c029da2953fd])\n[#2339 state:fixed-in-qa] getAllResponseHeaders\nwas actually returning request headers \nhttps://github.com/appcelerator/titanium_mobile/commit/4f2561249677...
Titanium SDK version: 1.5.0 (12/07/10 10:00 8f4eea3...),\nbugTest, Android 1.6, 2.1