{ "id": "62123", "key": "TIMOB-1491", "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": "11228", "name": "Release 1.5.0 M03", "archived": true, "released": true, "releaseDate": "2010-11-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:19.000+0000", "created": "2011-04-15T02:54:11.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:19.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": "{html}

See iPhone Impl. \nhttp://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUtils.m#L507

\n

See Helpdesk\n34201

{html}", "attachment": [ { "id": "18001", "filename": "escaped.png", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:11.000+0000", "size": 38402, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Auto Encode Network URLs", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125836", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Sample exception when not encoded properly (in this case the @\nsign):

\n
\nCaused by: java.net.URISyntaxException: Illegal character in query at index XX: http://xx.xx.com/sub2.php?uname=ld@xx.com&appname=testt&desc=test\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:12.000+0000", "updated": "2011-04-15T02:54:12.000+0000" }, { "id": "125837", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [c7d39ced1783389ae16ab299bf729366bfdae1bc])\nEncode URIs. [#1491] \nhttp://github.com/appcelerator/titanium_mobile/commit/c7d39ced17833...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:54:12.000+0000", "updated": "2011-04-15T02:54:12.000+0000" }, { "id": "125838", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Additional commit (forgot the auto comment here):
\n\nhttp://github.com/appcelerator/titanium_mobile/commit/768616c5f7595...

\n

We're waiting for a fail case. The fail case from that helpdesk\nticket is not a fail case anymore.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:12.000+0000", "updated": "2011-04-15T02:54:12.000+0000" }, { "id": "125839", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

This has been fixed for a while, and though we tried, we never\ngot any confirmation from the customer (see Helpdesk\n34201. The original url given by the customer contained both\nat-signs (@) and slashes. In case that url is private, here's a\ndummy version of it that we can use for testing, contained inside\nthis test app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar URL = 'http://developer.appcelerator.com/sub2.php?uname=ld@appcelerator.com.com&appname=testt&desc=test&success=why&datesub=2010/08/01&phoneid=1';\n\nvar xhr = Ti.Network.createHTTPClient();\n\nxhr.onerror = function(e) {\n    Ti.API.error('ERROR: ' + e.error);\n};\nxhr.onload = function(e) {\n    Ti.API.info('XHR SUCCESS');\n};\n\nxhr.open('GET', URL);\nxhr.send();\n
\n

(Again, that's a dummy url, so you will get a 404 as\nexpected.)

\n

This is tough to test without a protocol analyzer since we don't\nexpose any APIs to show what the \"final\" url being used is. This\nscreenshot is me using Wireshark, and you can see that the at-sign\nhas been properly escaped to %40, and the slashes to %2F.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:13.000+0000", "updated": "2011-04-15T02:54:13.000+0000" }, { "id": "125840", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

closing cuz Bill says its closed :)

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:54:13.000+0000", "updated": "2011-04-15T02:54:13.000+0000" }, { "id": "125841", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [bcdf46569b53be86fc029577ec5147abda6a6c17])\n[#2589 state:fixed-in-qa][#1491] Add\nautoEncodeUrl property to HTTPClient (default=true, thus preserving\ncurrent behavior). Setting to false means your url will remain\nuntouched. Add drillbit unit tests. \nhttps://github.com/appcelerator/titanium_mobile/commit/bcdf46569b53...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:13.000+0000", "updated": "2011-04-15T02:54:13.000+0000" }, { "id": "125842", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [fbc043377a7e44753497c3ec0c9979c0cb53b359])\n[#2589 state:fixed-in-qa][#1491] Add\nautoEncodeUrl property to HTTPClient (default=true, thus preserving\ncurrent behavior). Setting to false means your url will remain\nuntouched. Add drillbit unit tests. \nhttps://github.com/appcelerator/titanium_mobile/commit/fbc043377a7e...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:54:13.000+0000", "updated": "2011-04-15T02:54:13.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }