{ "id": "67429", "key": "TIMOB-4321", "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": [ { "id": "11356", "description": "Mobile 1.8.0 M03", "name": "Sprint 2011-24", "archived": true, "released": true, "releaseDate": "2011-06-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-14T12:49:18.000+0000", "created": "2011-06-06T07:28:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "enterprise", "exception", "httpclient" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2011-07-06T17:53:49.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": "If you attempt to open a HTTP connection using the HttpClient, a null pointer exception is thrown if you do not have the protocol http or https specificied in the url. Although not specifying the protocol is bad, it shouldn't throw out a null pointer exception. The issue is in the TiHTTPClient class with the following method signature: private static Uri getCleanUri(String uri). The encodedAuthority String object can be null but is not checked before doing the indexOf operation on which throws an exception.\r\n\r\nExample Code:\r\n{code}\r\nvar window = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\n\r\nwindow.open();\r\n\r\nvar xhr = Ti.Network.createHTTPClient();\r\nxhr.validatesSecureCertificate = true;\r\n\r\nxhr.onerror = function(e){\r\n alert(e.error);\r\n};\r\nxhr.onload = function(e){\r\n alert(this.responseText);\r\n\r\n}\r\n\r\nxhr.open('GET', 'google.com');\r\nxhr.send();\r\n\r\n{code}\r\n\r\nHelpdesk Ticket:\r\nhttp://support.appcelerator.com/tickets/APP-946174/homepage", "attachment": [ { "id": "21146", "filename": "tsDefault.zip", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-06-13T17:51:59.000+0000", "size": 5362116, "mimeType": "application/zip" } ], "flagged": false, "summary": "HTTP Requests throws null pointer exception", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "156665", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "test app", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-06-13T17:51:59.000+0000", "updated": "2011-06-13T17:51:59.000+0000" }, { "id": "156737", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Code review and functional tests: no scheme, http scheme, and https scheme. Note if you use https, remember to set validate cert to {{false}}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-14T12:49:18.000+0000", "updated": "2011-06-14T12:49:18.000+0000" }, { "id": "158853", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Null pointer exception no longer occurs in build 1.8.0.v20110706150638. Tested and passed on an Android device running 2.2.1", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-06T17:53:49.000+0000", "updated": "2011-07-06T17:53:49.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }