{ "id": "101972", "key": "TIMOB-13328", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2020-01-09T22:13:20.000+0000", "created": "2012-09-25T19:55:09.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "hard_to_verify" ], "versions": [ { "id": "14613", "description": "Release 2.1.4", "name": "Release 2.1.4", "archived": true, "released": true, "releaseDate": "2012-11-12" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:13:20.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": "Note: You will need to set up your own web server redirect to verify this issue.\r\n\r\n\r\nOur webserver includes a 302 redirect response to adjust the webservice location our application points to. This would allow us to make an updated version of the webservices and point production mobile apps to the new web service URLs as needed.\r\n\r\n\r\nThis works fine with our application under iOS, but unfortunately the Android version of the HTTP Client appears to be interpretting a 302 response as a 404 not found error and does not contain the proper response headers at any point. Specifically we need to pull out the location response header.\r\n\r\n\r\nWe tried checking at any readyStateChange event as well, but the response is never updated with the correct information.\r\n\r\n\r\nMonitoring the actual http request with Wireshark we can see that the request and response are what they should be. The server responds with the following:\r\n\r\n\r\nHTTP/1.1 302 Moved Temporarily\r\nServer: Apache-Coyote/1.1\r\nLocation: [***OUR ACTUAL DESIRED SERVER URL***]\r\nContent-Length: 0\r\nDate: Tue, 25 Sep 2012 18:26:12 GMT\r\nConnection: close\r\n\r\n\r\nHowever, the HTTP client instead throws a 404 (not found) error.\r\n\r\n\r\nThe attached http client code is small (there doesn't need to be much to see what is happening), but shows what we are trying to do.", "attachment": [ { "id": "31809", "filename": "exampleRequest.js", "author": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-25T19:55:09.000+0000", "size": 1346, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: HTTP Client does not properly handle server redirects", "creator": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mlyon@gavant.com", "key": "mlyon@gavant.com", "displayName": "Miles Lyon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.2.GA, 2.1.1.GA", "comment": { "comments": [], "maxResults": 2, "total": 2, "startAt": 0 } } }