{ "id": "77174", "key": "TIMOB-4537", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-15T18:27:57.000+0000", "created": "2011-06-30T14:42:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-15T18:27:57.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": "The current getResponseheaders() will return the headers of one url which is called in the xhr request. If the url is redirected to multiple url's, the above function does not return the intermediate response headers. Currently, it returns the header information of the last redirected url.\r\n\r\nStep1: Run the code below.\r\nStep2: type in http://google.com in the below link and check the headers.\r\nhttps://apigee.com/console/others#\r\nYou can see that the url is redirected to http://www.google.com\r\nStep3: The code returns header information of http://www.google.com but not http://google.com\r\n{code:title=\"app.js\"}\r\nvar win = Titanium.UI.createWindow();\r\nvar button2 = Ti.UI.createButton({\r\n \ttop:90,\r\n \ttitle:'xhr get',\r\n \theight:40\r\n \t\r\n });\r\n \r\n\r\n win.add(button2);\r\n var client = Titanium.Network.createHTTPClient();\r\n\r\nbutton2.addEventListener('click',function(e)\r\n{\r\n\t\t\r\n \tclient.onload = function() \r\n \t{\r\n Titanium.API.info(\"Loaded! Status: \" + this.status);\r\n \r\n var contentType = this.getResponseHeader('Set-Cookie');\r\n Titanium.API.info(\"Content-Type: \" + contentType);\r\n alert(contentType);\r\n \r\n };\r\n \r\n \r\n\tclient.open(\"GET\", 'http://google.com');\r\n\t\r\n\tclient.send();\r\n\t\r\n});\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ability to obtain intermediate response headers when the url is redirected in a xhr request", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 4.3 and Ti SDK 1.7.0", "comment": { "comments": [ { "id": "422076", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and lack of progress in the past few years. Any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-15T18:27:57.000+0000", "updated": "2017-06-15T18:27:57.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }