{ "id": "62782", "key": "TIMOB-2150", "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:58:14.000+0000", "created": "2011-04-15T03:11:59.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:14.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}

When sending a request to XHR to the following URL:

\n

\nhttp://mike@demandocat.com:testing@api.lafitness.com/Services/Priva...

\n

The request is directed to demandocat.com instead of\napi.lafitness.com.

\n

Some sort of issue exists parsing URLs that contain\nusername/passwords when they contain the @ char.

{html}", "attachment": [ { "id": "18116", "filename": "after.png", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:00.000+0000", "size": 54839, "mimeType": "image/png" }, { "id": "18115", "filename": "before.png", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:00.000+0000", "size": 45264, "mimeType": "image/png" } ], "flagged": false, "summary": "Android, parse problem with URLs that contain @ in username ", "creator": { "name": "bryanjackson", "key": "bryanjackson", "displayName": "Bryan Jackson", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bryanjackson", "key": "bryanjackson", "displayName": "Bryan Jackson", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127645", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [805f7249f4257f55c5b1a8691b13ef59669c0b84])\n[#2150 state:fixed-in-qa] Handle @ signs in the\nusername portion of the authority part of a URI. \nhttps://github.com/appcelerator/titanium_mobile/commit/805f7249f425...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:01.000+0000", "updated": "2011-04-15T03:12:01.000+0000" }, { "id": "127646", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

This was a \"fun\" one: not even the native Android Uri class\nseemed to handle this properly, whereas falling back to the Java\nURL class seems to work. Maybe if Bryan is listening, he could try\nthis out with our latest build? If you use our continuous\nbuild server, be sure to choose a build on the master branch,\ndated Nov 28 or later.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:01.000+0000", "updated": "2011-04-15T03:12:01.000+0000" }, { "id": "127647", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

To Appcelerator QA:

\n

We don't expose any APIs to look at the \"final\" url, host,\nuser-authentication info, etc., so this is hard to test unless you\nuse a protocol analyzer (or setup your own host server ;) ).

\n

Here's an example of me using Wireshark in before and after\nscenarios, to show the difference.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:01.000+0000", "updated": "2011-04-15T03:12:01.000+0000" }, { "id": "127648", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

... and here's a test app.js to use for it:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar URL = 'http://mike@demandocat.com:testing@api.lafitness.com/Services/Private.svc/GetCustomer';\n\nvar xhr = Ti.Network.createHTTPClient();\n\nxhr.onerror = function(e) {\n    Ti.API.info('XHR onerror running with message \"' + e.error + '\", HTTP response code  ' + xhr.status + '. If the status is \"401\", that is actually a good thing, as it probably means the request (which contains bogus user/password) indeed went to api.lafitness.com, as desired.  But only a protocol analyzer can confirm this.');\n};\nxhr.onload = function(e) {\n    Ti.API.info('XHR onload running. HTTP response code=' + xhr.status + '. This is suspicious, as it suggests the request did not really go to api.lafitness.com, from where we would expect to get a 401, which should cause XHR onerror to run.  But only a protocol analyzer can verify what really happened.');\n};\n\nxhr.open('GET', URL);\nxhr.send();\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:12:01.000+0000", "updated": "2011-04-15T03:12:01.000+0000" }, { "id": "127649", "author": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

How dowes this impact #2149? I don't understand priority.\n#2149 given low priority while #2150 high\npriority for same issue on two platforms

{html}", "updateAuthor": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:02.000+0000", "updated": "2011-04-15T03:12:02.000+0000" }, { "id": "127650", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The iPhone team has not prioritized the issue. Our fixing of\n#2149 has no impact positive or negative on the\niOS issue.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:02.000+0000", "updated": "2011-04-15T03:12:02.000+0000" }, { "id": "127651", "author": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi. The priority on the ticket is set to Low on the ticket. Am\nfinding the httpclient in iOS for most part unusable and in a\ndeteriorating state. Not quite sure where to go with this as months\nare going by. I can send and receive json but in only the most\nbasic way and it is virtually useless for my apps since\nauthentication and transport are handicapped by issues that are\nstacking up (as long as seven months)

\n

Standard authentication schemes, setting request headers,\ngetting response headers and this passing credentials in url are\nbasic things you need to get done in a client lib. Despite setting\nup a decent generic method for handling http, it is not my code but\nthe client that is broken, regresses and remains this way. To\nsummarize the issues in iOS:

\n\n

A common thing to want to do with titianium is to interact with\na web service and has become increasingly frustrating since even\nbasic authentication cannot be accomplished without setting\nauthorization headers or passing credentials in a url, and JSON\ncannot be transported without errors in or in a secure way. I am\nsure you can get a sense that this is impossible to work with.

\n

Can you advise whether you employ any unit testing on your side\nto see such things before they are reported? This is second time\nround for discussing headers for me and there is no doubt others\nare not finding lighthouse to report the trouble. I believe this is\nat least a second or third regression setting request headers.

\n

If these things cannot be fixed, perhaps replacing with\nsomething better is a reasonable option. I have attached a link for\na reliable general purpose http and REST lib used in many\nsuccessful iPhone projects and which includes unit tests. Please\nforward this to someone on the iPhone team to examine for potential\nwrapping. If things do not improve, I will be looking to wrap some\nof this generic functionality.

\n

http://allseeing-i.com/ASIHTTPRequest/

{html}", "updateAuthor": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:02.000+0000", "updated": "2011-04-15T03:12:02.000+0000" }, { "id": "127652", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@fairwinds this is not a forum and polluting the tickets with\ninformation unrelated to the ticket doesn't help at all. Please\nmove your comments over to the iPhone ticket and make sure they\napply to that ticket. This is an android only ticket. Thank\nyou.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:02.000+0000", "updated": "2011-04-15T03:12:02.000+0000" }, { "id": "127653", "author": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

You are right of course - however the point is that tickets have\nbeen filed and some are now up to 7 months old. I will write\nanother for requestHeaders since this is another regression of this\nissue. Not sure whether anyone there understands the impact the\nissues are having as a whole. The client is seriously crippled at\nthis point. Where should this be communicated as each ticket on its\nown does not consider the scope of the issues that have left the\nclient in a virtually unusable state for application\ndevelopment.

{html}", "updateAuthor": { "name": "fairwinds", "key": "fairwinds", "displayName": "David Pratt", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:02.000+0000", "updated": "2011-04-15T03:12:02.000+0000" }, { "id": "127654", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8),\nAndroid Sim 1.6. 2.1, custom app

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:12:03.000+0000", "updated": "2011-04-15T03:12:03.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }