{ "id": "85674", "key": "TIMOB-7501", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-12T22:43:33.000+0000", "created": "2012-01-29T06:51:43.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-12T22:43:33.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": "h2. Problem\r\n\r\nUsing HTTPClient, the URL is not encoded properly with the {{autoEncodeUrl}} property set to true (default).\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar socket = Ti.Network.createHTTPClient();\r\n\r\nsocket.onload = function(){\r\n /*\r\n Returns: http://www.bosscube.com/flash/clock.swf?param1=%20¶m2=%EF%BF%BD%EF%BF%BD\r\n Expected: http://www.bosscube.com/flash/clock.swf?param1=%20¶m2=%25\r\n */\r\n alert(this.location);\r\n Ti.API.info('this.location: ' + this.location);\r\n};\r\n\r\nsocket.open(\"GET\", \"http://www.bosscube.com/flash/clock.swf?param1=¶m2=%\");\r\nsocket.send();\r\n{code}\r\n\r\nh2. Logs\r\n{code:lang=none|title=Logcat}\r\n 778 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 778 AndroidRuntime D CheckJNI is ON\r\n 778 AndroidRuntime D --- registering native functions ---\r\n 60 ActivityManager I Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.appcelerator.testing10/.Testing10Activity }\r\n 60 ActivityManager I Start proc com.appcelerator.testing10 for activity com.appcelerator.testing10/.Testing10Activity: pid=784 uid=10040 gids={1015, 3003}\r\n 778 AndroidRuntime D Shutting down VM\r\n 784 TiApplication I (main) [0,0] checkpoint, app created.\r\n 784 TiApplication I (main) [391,391] Titanium 1.8.1 (2012/01/27 17:31 a24502a)\r\n 784 TiFastDev D (main) [94,485] Enabling Fastdev on port 33817\r\n 784 TiFastDev D (main) [9,494] sent tokens successfully\r\n 784 TiFastDev D (main) [1,495] Fastdev session handshake succesful.\r\n 784 TiApplication I (main) [9,504] Titanium Javascript runtime: v8\r\n 784 TiApplication W (main) [61,565] activity stack is emtpy, unable to get current activity\r\n 784 TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n 784 TiApplication W (main) [119,119] activity stack is emtpy, unable to get current activity\r\n 784 TiApplication W (main) [0,119] activity stack is emtpy, unable to get current activity\r\n 784 TiApplication W (main) [2,121] activity stack is emtpy, unable to get current activity\r\n 784 TiApplication E (KrollRuntimeThread) [922,1043] APP PROXY: ti.modules.titanium.app.AppModule@44f0ced8\r\n 784 TiAssetHelper D Fetching \"app.js\" with Fastdev...\r\n 60 NotificationService W Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@4513c8a0 in package com.appcelerator.testing10\r\n 60 ActivityManager W setProcessForeground called on unknown pid: 755\r\n 784 dalvikvm-heap I Grow heap (frag case) to 2.932MB for 69224-byte allocation\r\n 784 TiHttpClient D (KrollRuntimeThread) [442,1485] Setting ready state to 1\r\n 784 TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.testing10.Testing10Activity@44eba488\r\n 60 ActivityManager I Displayed activity com.appcelerator.testing10/.Testing10Activity: 3155 ms (total 3155 ms)\r\n 784 TiHttpClient D (TiHttpClient-1) [968,968] Setting ready state to 2\r\n 784 TiHttpClient D (TiHttpClient-1) [2,970] Setting ready state to 3\r\n 784 TiHttpClient D (TiHttpClient-1) [158,1128] Setting ready state to 4\r\n 784 ALERT I (KrollRuntimeThread) [4,1132] http://www.bosscube.com/flash/clock.swf?param1=¶m2=%EF%BF%BD%EF%BF%BD\r\n 784 TiAPI I this.location: http://www.bosscube.com/flash/clock.swf?param1=¶m2=0.000000E+00FBFBD1.237263E-317FBFBD\r\n 784 TypeConverter W jsValueToJavaObject returning null\r\n{code}\r\n\r\n\r\nh2. Related Issues\r\n\r\nI've also noticed that parts of the URL are encoded that shouldn't be. For example:\r\n\r\n{code:javascript}\r\nvar socket = Ti.Network.createHTTPClient();\r\n\r\nsocket.onload = function() {\r\n /*\r\n Returns: http://www.example.com/abcdef%3D%3D?param1=example\r\n Expected: http://www.example.com/abcdef==?param1=example\r\n */\r\n alert(this.location);\r\n};\r\n\r\nsocket.open(\"GET\", \"http://www.example.com/abcdef==?param1=example\");\r\nsocket.send();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Network.createHTTPClient - URL not encoded correctly with autoEncodeUrl enabled", "creator": { "name": "bosscube", "key": "bosscube", "displayName": "Justin Szczurowski", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bosscube", "key": "bosscube", "displayName": "Justin Szczurowski", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium SDK 1.9.0 v20120128124634\r\n* Android SDK 2.2\r\n* v8\r\n* emulator\r\n", "comment": { "comments": [ { "id": "181027", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for raising this ticket.\r\n\r\nIn order for me to escalate it to the core team, please would you complete the environment field?\r\n\r\nAlso, a console log of the test case in action would be appreciated.\r\n\r\nPlease review the [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist] when raising tickets, and always start with the [JIRA Ticket Template|https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template] to ensure they are in the recommended format.\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-30T03:41:52.000+0000", "updated": "2012-01-30T03:41:52.000+0000" }, { "id": "421833", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to the time passed, lack of information and lack of progress. Any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T22:43:33.000+0000", "updated": "2017-06-12T22:43:33.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }