{ "id": "60895", "key": "TIMOB-263", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-05-08T10:36:13.000+0000", "created": "2011-04-15T02:26:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [ { "id": "17170", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "63481", "key": "TIMOB-2849", "fields": { "summary": "Android: Set-Cookie Response Headers Only Returns Max of One Cookie", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:39:59.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}

From \ncookies in httpclient request

\n

I am developing an app that uses AJAX style requests back to a\nhost server. This works fine on the iPhone but not in Android.

\n

I have to first authenticate which sets a cookie for subsequent\ncalls. It seems like on android this cookie is not being returned\non subsequent calls.

{html}", "attachment": [], "flagged": false, "summary": "Android: Not forwarding cookies in HTTPClient", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "194111", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "I believe this has been addressed by [TIMOB-2849]. The following code tests cookie interaction. Cookies do persist across sessions, hence my assertion that this is resolved.\r\n\r\n{code:title=app.js}\r\nvar win = Titanium.UI.createWindow({ backgroundColor:'#fff' });\r\nvar testServer = 'http://appc.me/Test/Cookies/';\r\n\r\n/**\r\n * Create a text area to show responses from the server.\r\n */\r\nvar response = Titanium.UI.createTextArea({\r\n left: 0, right: 0, top: 0, bottom: 30,\r\n value: 'Click a button below, and the response from the server will show up here!'\r\n});\r\nwin.add(response);\r\n\r\n/**\r\n * Create a button that will hit a page on a test server that echoes any cookies we send it, or sends us two cookies.\r\n */\r\nvar getOrSetCookies = Titanium.UI.createButton({ title : 'Get or Set Cookies', left: 0, bottom: 0, width: 150, height: 30 });\r\ngetOrSetCookies.addEventListener('click', function(e) {\r\n var xhr = Ti.Network.createHTTPClient();\r\n xhr.onload = function(e) {\r\n response.value = this.responseText\r\n + '\\n\\nthis.getResponseHeader(\\'Set-Cookie\\'): '\r\n + this.getResponseHeader('Set-Cookie');\r\n };\r\n xhr.open('GET', testServer + '?count=2&clear=false');\r\n xhr.send();\r\n});\r\nwin.add(getOrSetCookies);\r\n\r\n/**\r\n * Create a button that will clear the cookies on the server (set them to expire). It will tell us how many were cleared.\r\n */\r\nvar clearCookies = Titanium.UI.createButton({ title : 'Clear Cookies', right: 0, bottom: 0, width: 150, height: 30 });\r\nclearCookies.addEventListener('click', function(e) {\r\n var xhr = Ti.Network.createHTTPClient();\r\n xhr.onload = function(e) {\r\n response.value = this.responseText\r\n + '\\n\\nthis.getResponseHeader(\\'Set-Cookie\\'): '\r\n + this.getResponseHeader('Set-Cookie');\r\n };\r\n xhr.open('GET', testServer + '?count=2&clear=true');\r\n xhr.send();\r\n});\r\nwin.add(clearCookies);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-08T10:15:51.000+0000", "updated": "2012-05-08T10:15:51.000+0000" }, { "id": "194120", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-2849.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-08T10:36:13.000+0000", "updated": "2012-05-08T10:36:13.000+0000" }, { "id": "414599", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:39:59.000+0000", "updated": "2017-03-21T22:39:59.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }