{ "id": "63308", "key": "TIMOB-2676", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-07-26T03:12:21.000+0000", "created": "2011-04-15T03:26:43.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "httpclient", "response", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-07-26T03:12:21.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": "The Android HttpClient module in 1.5.1 is unable to handle a missing entity. This is possible when encountering a 204 HTTP status code (no content).\r\n\r\nThe following is stated in the Apache HttpClient \"http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpEntity.html\" Java API doc:\r\n\r\n\"An entity that can be sent or received with an HTTP message. Entities can be found in some requests and in responses, where they are optional.\"\r\n\r\nCurrently lines 203 - 208 in TiHTTPClient.java assume that any status code less then 300 will have an entity. However this is not true. Other codes may not. This includes 204 (no content) and 201 (created).\r\n\r\nRequests made that result in these response codes will currently result in null pointer exceptions when executing line 209:\r\n\r\n{code}\r\nentity = response.getEntity();\r\nif (entity.getContentType() != null) {\r\n contentType = entity.getContentType().getValue();\r\n}\r\n{code}\r\n\r\nThe iPhone version does not appear to suffer from the same issue.", "attachment": [], "flagged": false, "summary": "Titanium Mobile Android HttpClient Unable to Handle 204 Error Code", "creator": { "name": "philip.jarrell(atgmail)", "key": "philip.jarrell(atgmail)", "displayName": "philip.jarrell (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "philip.jarrell(atgmail)", "key": "philip.jarrell(atgmail)", "displayName": "philip.jarrell (at gmail)", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129179", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}
Assigning to Don for triage.