{ "id": "151452", "key": "AC-1500", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-10-02T13:33:45.000+0000", "created": "2015-09-24T12:13:11.000+0000", "labels": [ "android", "httpclient" ], "versions": [], "issuelinks": [ { "id": "49176", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "151676", "key": "TIMOB-19660", "fields": { "summary": "Android: 5.0.2 GA HTTPClient handleResponse error", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:57.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "If a POST request issues an 200 OK response with no body (which is optional) and thereby no content-type:\r\n{code:java}\r\nHTTP/1.1 200 OK\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nContent-Length: 0\r\nExpires: -1\r\nServer: Microsoft-IIS/8.0\r\nX-AspNet-Version: 4.0.30319\r\nX-Powered-By: ASP.NET\r\nDate: Wed, 23 Sep 2015 19:30:19 GMT\r\n{code}\r\n\r\nA nullPointerException is thrown on Android:\r\n{code:java}\r\n[ERROR] : TiHTTPClient: (TiHttpClient-10) [44708,46136] HTTP Error (java.lang.NullPointerException): Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference\r\n[ERROR] : TiHTTPClient: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference\r\n[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:195)\r\n[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:84)\r\n[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1194)\r\n[ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818)\r\n{code}\r\n\r\nAs noted by Fokke in this post: https://community.appcelerator.com/topic/3447/android-http-post-request-fails-on-5-0-but-works-on-4-1/2 it seems as if theres a bug in TiHTTPClient.java in line 193-197.", "attachment": [], "flagged": false, "summary": "Android: HTTP POST response with no body throws exception on SDK 5.0", "creator": { "name": "andersdp", "key": "andersdp", "displayName": "Anders Dahl Pape", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "andersdp", "key": "andersdp", "displayName": "Anders Dahl Pape", "active": true, "timeZone": "Europe/Berlin" }, "environment": "OSX 10.10.5 Yosemite. Appcelerator Studio 4.3, SDK 5.0.1. Android 4.X - 5.X", "comment": { "comments": [ { "id": "364869", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On iOS everything is fine...\r\nFacing same problem only on Android (no matter which version).\r\nSwitch to SDK 4.1 and 3.5.1 and it works.", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-24T13:15:54.000+0000", "updated": "2015-09-24T13:15:54.000+0000" }, { "id": "365048", "author": { "name": "osielbq@gmail.com", "key": "osielbq@gmail.com", "displayName": "Osiel Bonilla Quezada", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have the same issue with Titanium SDK 5.0.1.GA And Android api 23\r\n\r\n[ERROR] : TiHTTPClient: (TiHttpClient-3) [11093,12862] HTTP Error (java.lang.NullPointerException): Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference\r\n[ERROR] : TiHTTPClient: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference\r\n[ERROR] : TiHTTPClient: \tat ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:195)\r\n[ERROR] : TiHTTPClient: \tat ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:84)\r\n[ERROR] : TiHTTPClient: \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1194)\r\n[ERROR] : TiHTTPClient: \tat java.lang.Thread.run(Thread.java:818)", "updateAuthor": { "name": "osielbq@gmail.com", "key": "osielbq@gmail.com", "displayName": "Osiel Bonilla Quezada", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-27T02:16:58.000+0000", "updated": "2015-09-27T03:39:01.000+0000" }, { "id": "365233", "author": { "name": "Ventis", "key": "ventis", "displayName": "David Vermeir", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have an issue with sending the request on Android in the first place. If you have form-data together with a file, the body is empty on arrival on the server but the file is still there. Without the file, the body is filled correctly. This worked on 3.5.0.", "updateAuthor": { "name": "Ventis", "key": "ventis", "displayName": "David Vermeir", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-29T09:23:04.000+0000", "updated": "2015-09-29T09:23:04.000+0000" }, { "id": "365604", "author": { "name": "ryan@asleson.net", "key": "ryan@asleson.net", "displayName": "Ryan Asleson", "active": true, "timeZone": "America/Chicago" }, "updateAuthor": { "name": "ryan@asleson.net", "key": "ryan@asleson.net", "displayName": "Ryan Asleson", "active": true, "timeZone": "America/Chicago" }, "created": "2015-10-02T02:17:03.000+0000", "updated": "2015-10-02T02:17:03.000+0000" }, { "id": "365620", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-10-02T06:17:15.000+0000", "updated": "2015-10-02T06:17:15.000+0000" }, { "id": "365622", "author": { "name": "andersdp", "key": "andersdp", "displayName": "Anders Dahl Pape", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sounds great :D", "updateAuthor": { "name": "andersdp", "key": "andersdp", "displayName": "Anders Dahl Pape", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-02T06:53:21.000+0000", "updated": "2015-10-02T06:53:21.000+0000" }, { "id": "365630", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "awesome!\r\nQuotes issues =P", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-02T08:16:53.000+0000", "updated": "2015-10-02T08:16:53.000+0000" }, { "id": "365657", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of linked issue", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-02T13:33:46.000+0000", "updated": "2015-10-02T13:33:46.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }