{ "id": "83353", "key": "TIMOB-6446", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14157", "description": "Sprint 2012-20 API", "name": "Sprint 2012-20 API", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14272", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-27T20:39:26.000+0000", "created": "2011-12-02T18:10:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-and082012" ], "versions": [ { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" }, { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" }, { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-05T22:28:36.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": "Titanium.Network.HTTPClient.send loads text instead of image (log and screenshot attached).\r\nBug specific to Android 2.x. \r\nBehavior not found in iOS or Android 3.x.\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run KitchenSink (or KitchenSink-Nook if using the NookColor to have a valid test configuration).\r\n2. Go to Platform > XHR > File Download.\r\n3. Click \"Set Web View (Data)\".\r\n\r\nExpected Result:\r\n\r\nImage should display.\r\n\r\nActual Result:\r\n\r\nText displays (screenshot attached). Errors log (attached).", "attachment": [ { "id": "24453", "filename": "device-2011-12-02-175321.png", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-02T18:10:53.000+0000", "size": 124734, "mimeType": "image/png" }, { "id": "24452", "filename": "log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-02T18:10:53.000+0000", "size": 4019, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Titanium.Network.HTTPClient.send - V8/Rhino - Android 2.x - send() loads text instead of image", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.0.1.v20111201230657, 1.7.5, 1.7.4, 1.7.3, 1.7.2, 1.6.2\r\nAndroid Runtimes: V8, Rhino\r\nStudio: 1.0.7.201112011810\r\nOS: OS X Lion\r\nDevices Affected: Droid 2.2.2, Nexus 2.3.6, NookColor", "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "215730", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Occurs on:\r\nTitanium Studio, build: 2.1.2.201208201549\r\nSDK version: 2.1.2.v20120821160113\r\nDevices:\r\nMotorola Droid (2.2.3)\r\n", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-22T17:17:07.000+0000", "updated": "2012-08-22T17:17:07.000+0000" }, { "id": "218736", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There's a URL in this code that is no longer valid:\r\n\r\nGET','http://www.appcelerator.com/wp-content/themes/appcelerator/img/a-logo.png\r\n\r\nIn this case, the HTTP server returns a web page that includes some \"404\" text.\r\n\r\nIf I replace the invalid URL with a valid one here, it works as expected:\r\n\r\n\r\nttp://codedog.net/wp-content/uploads/2011/09/appcelerator.png\r\n\r\nThis is the same issue as for other tickets with invalid URL's.\r\n\r\n", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-12T16:12:05.000+0000", "updated": "2012-09-12T16:12:05.000+0000" }, { "id": "219610", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On Android, webview.setData(TiBlob data) only works for html-string. It does not work for binary data, eg. image. This is a native Android behavior. In the Android [doc|http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String, java.lang.String, java.lang.String)], it points out:\r\n{quote}\r\nThe 'data' scheme URL formed by this method uses the default US-ASCII charset. If you need need to set a different charset, you should form a 'data' scheme URL which explicitly specifies a charset parameter in the mediatype portion of the URL and call loadUrl(String) instead. \r\n{quote}\r\nAnd there are several related discussion:\r\nhttp://code.google.com/p/android/issues/detail?id=596\r\nhttp://stackoverflow.com/questions/5267124/how-to-display-image-with-webview-loaddata\r\n\r\nWill modify the KS test. PR https://github.com/appcelerator-developer-relations/KitchenSink/pull/34", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-18T16:41:20.000+0000", "updated": "2012-09-18T21:14:12.000+0000" }, { "id": "230132", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested on: \r\nTitanium Studio, build: 3.0.0.201211301903\r\nTitanium SDK, build: 3.0.0.v20121204181658\r\nDevices: HTC Nexus One (2.2.2)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T22:28:36.000+0000", "updated": "2012-12-05T22:28:36.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }