{ "id": "136060", "key": "TIMOB-17612", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-01-07T19:26:40.000+0000", "created": "2014-09-03T18:43:36.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "decompression", "httpclient", "module_network", "parity", "qe-manualtest", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2015-01-07T19:26:40.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": "Gzipped data isn't decompressed if the response status code is >=400 (https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L273-L275)\r\n\r\nWhereas for response status codes <400, the response is properly decompressed.\r\n(https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L285)", "attachment": [], "flagged": false, "summary": "Titanium Android: HTTPClient doesn't decompress gzipped data for error responses", "creator": { "name": "stephenwoodford", "key": "stephenwoodford", "displayName": "Stephen Woodford", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "stephenwoodford", "key": "stephenwoodford", "displayName": "Stephen Woodford", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 291, "state": "closed", "name": "2015 Sprint 01 SDK", "startDate": "2015-01-03T01:00:00.000Z", "endDate": "2015-01-17T01:00:00.000Z", "completeDate": "2015-01-19T17:24:40.828Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "321637", "author": { "name": "stephenwoodford", "key": "stephenwoodford", "displayName": "Stephen Woodford", "active": true, "timeZone": "America/Chicago" }, "body": "Forgot to mention, iOS properly decompresses data in error responses, so this is a parity issue as well.", "updateAuthor": { "name": "stephenwoodford", "key": "stephenwoodford", "displayName": "Stephen Woodford", "active": true, "timeZone": "America/Chicago" }, "created": "2014-09-03T18:44:11.000+0000", "updated": "2014-09-03T18:44:11.000+0000" }, { "id": "326934", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Took *FOREVER* to track this down. To hopefully help others with some google bait... The dump I get when I hit this bug:\r\n\r\n{code}\r\n[ERROR] : V8Exception: Exception occurred at undefined:1: Uncaught SyntaxError: Unexpected token \u001f\r\n[ERROR] : XMLModule: (KrollRuntimeThread) [19,11721] Error parsing XML\r\n......\r\n[ERROR] : TiHttpClient: \tat android.os.Looper.loop(Looper.java:136)\r\n[ERROR] : TiHttpClient: \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\n{code}\r\n\r\nAlso, the raw response:\r\n\r\n", "updateAuthor": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "created": "2014-10-03T21:10:53.000+0000", "updated": "2014-10-13T17:17:35.000+0000" }, { "id": "326990", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I have the same issue. The bug seems to be introduced in 3.3.0 with the new HTTPClient.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-04T06:01:24.000+0000", "updated": "2014-10-04T06:01:24.000+0000" }, { "id": "326994", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I was able to reproduce the bug in 3.2.1 and 3.1.2.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2014-10-04T14:11:26.000+0000", "updated": "2014-10-04T14:11:26.000+0000" }, { "id": "327879", "author": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "body": "[~iotashan] Can you please attach raw code and probably log as file ? That black diamonds with questions marks kills email notifications in JIRA too ) .\r\n\r\nSo I had to remove them.", "updateAuthor": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "created": "2014-10-13T17:16:06.000+0000", "updated": "2014-10-13T17:19:49.000+0000" }, { "id": "337773", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/6530\r\n\r\nTest App:\r\n{code}\r\nvar url = \"https://api.stackexchange.com/2.2/answers?order=desc&sort=activity&site=stackoverflo2w\";\r\n var client = Ti.Network.createHTTPClient({\r\n // function called when the response data is available\r\n onload : function(e) {\r\n Ti.API.info(\"Received text: \" + this.responseText);\r\n alert('success');\r\n \r\n },\r\n // function called when an error occurs, including a timeout\r\n onerror : function(e) {\r\n Ti.API.debug(e.error);\r\n alert('error ' + this.responseText);\r\n\r\n },\r\n timeout : 5000 // in milliseconds\r\n });\r\n // Prepare the connection.\r\n client.open(\"GET\", url);\r\n // Send the request.\r\n client.send();\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-01-05T04:14:02.000+0000", "updated": "2015-01-05T04:14:02.000+0000" }, { "id": "338203", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. The gzip data gets decompressed as expected.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.4.1.201410281743\r\nTi SDK : 3.6.0.v20150106160923\r\nCLI : 3.4.1\r\nAlloy : 1.5.1 GA\r\nCode Processor : 1.1.1\r\nMAC Yosemite : 10.10", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-07T19:26:02.000+0000", "updated": "2015-01-07T19:26:02.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }