{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/100217159","pull_request_review_id":20916881,"id":100217159,"diff_hunk":"@@ -199,44 +283,92 @@ public void PacketReset(SNIHandle handle, bool write, SNIPacket packet)\n         /// <param name=\"async\">Asynchronous connection</param>\n         /// <param name=\"parallel\">Attempt parallel connects</param>\n         /// <returns>SNI handle</returns>\n-        public SNIHandle CreateConnectionHandle(object callbackObject, string fullServerName, bool ignoreSniOpenTimeout, long timerExpire, out byte[] instanceName, byte[] spnBuffer, bool flushCache, bool async, bool parallel)\n+        public SNIHandle CreateConnectionHandle(object callbackObject, string fullServerName, bool ignoreSniOpenTimeout, long timerExpire, out byte[] instanceName, ref byte[] spnBuffer, bool flushCache, bool async, bool parallel, bool isIntegratedSecurity)\n         {\n             instanceName = new byte[1];\n             instanceName[0] = 0;\n \n-            string[] serverNameParts = fullServerName.Split(':');\n-\n-            if (serverNameParts.Length > 2)\n+            SNIHandle sniHandle = null;\n+            if (!fullServerName.Contains(\":\"))\n             {\n-                SNILoadHandle.SingletonInstance.LastError = new SNIError(SNIProviders.INVALID_PROV, 0, SNICommon.InvalidConnStringError, string.Empty);\n-                return null;\n+                // default to using tcp if no protocol is provided\n+                sniHandle = CreateTcpHandle(fullServerName, timerExpire, callbackObject, parallel, ref spnBuffer, isIntegratedSecurity);\n             }\n-\n-            // Default to using tcp if no protocol is provided\n-            if (serverNameParts.Length == 1)\n-            {\n-                return CreateTcpHandle(serverNameParts[0], timerExpire, callbackObject, parallel);\n-            }\n-\n-            switch (serverNameParts[0])\n+            else\n             {\n-                case TdsEnums.TCP:\n-                    return CreateTcpHandle(serverNameParts[1], timerExpire, callbackObject, parallel);\n-\n-                case TdsEnums.NP:\n-                    return CreateNpHandle(serverNameParts[1], timerExpire, callbackObject, parallel);\n+                // when tcp protocol is specified\n+                if (fullServerName.ToLower().StartsWith(TdsEnums.TCP + \":\"))","path":"src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.cs","position":156,"original_position":153,"commit_id":"52c3552b0c5975865cc1c944f411a39016769c90","original_commit_id":"9b93c198e83133a6582b23f42004698681daeaf8","user":{"login":"corivera","id":12820011,"avatar_url":"https://avatars.githubusercontent.com/u/12820011?v=3","gravatar_id":"","url":"https://api.github.com/users/corivera","html_url":"https://github.com/corivera","followers_url":"https://api.github.com/users/corivera/followers","following_url":"https://api.github.com/users/corivera/following{/other_user}","gists_url":"https://api.github.com/users/corivera/gists{/gist_id}","starred_url":"https://api.github.com/users/corivera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corivera/subscriptions","organizations_url":"https://api.github.com/users/corivera/orgs","repos_url":"https://api.github.com/users/corivera/repos","events_url":"https://api.github.com/users/corivera/events{/privacy}","received_events_url":"https://api.github.com/users/corivera/received_events","type":"User","site_admin":false},"body":"Seems like all the \":\" logic can be replaced with a split on the index of the first colon. If the portion before that colon isn't one of the valid tokens, then just handle the IPv6 case in the default section.","created_at":"2017-02-09T02:02:34Z","updated_at":"2017-02-09T02:02:35Z","html_url":"https://github.com/dotnet/corefx/pull/15742#discussion_r100217159","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/15742","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/100217159"},"html":{"href":"https://github.com/dotnet/corefx/pull/15742#discussion_r100217159"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/15742"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/15742","id":104448965,"html_url":"https://github.com/dotnet/corefx/pull/15742","diff_url":"https://github.com/dotnet/corefx/pull/15742.diff","patch_url":"https://github.com/dotnet/corefx/pull/15742.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/15742","number":15742,"state":"open","locked":false,"title":"Enable Integrated Auth for Unix SqlClient","user":{"login":"geleems","id":19577035,"avatar_url":"https://avatars.githubusercontent.com/u/19577035?v=3","gravatar_id":"","url":"https://api.github.com/users/geleems","html_url":"https://github.com/geleems","followers_url":"https://api.github.com/users/geleems/followers","following_url":"https://api.github.com/users/geleems/following{/other_user}","gists_url":"https://api.github.com/users/geleems/gists{/gist_id}","starred_url":"https://api.github.com/users/geleems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geleems/subscriptions","organizations_url":"https://api.github.com/users/geleems/orgs","repos_url":"https://api.github.com/users/geleems/repos","events_url":"https://api.github.com/users/geleems/events{/privacy}","received_events_url":"https://api.github.com/users/geleems/received_events","type":"User","site_admin":false},"body":"This is for the new feature -- Integrated Authentication.\r\n@saurabh500 @corivera @tvrprasad @YoungGah","created_at":"2017-02-02T23:45:48Z","updated_at":"2017-02-09T02:02:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28cdcf6fd3d25e9c39d66374d5e9e365467cab3b","assignee":{"login":"geleems","id":19577035,"avatar_url":"https://avatars.githubusercontent.com/u/19577035?v=3","gravatar_id":"","url":"https://api.github.com/users/geleems","html_url":"https://github.com/geleems","followers_url":"https://api.github.com/users/geleems/followers","following_url":"https://api.github.com/users/geleems/following{/other_user}","gists_url":"https://api.github.com/users/geleems/gists{/gist_id}","starred_url":"https://api.github.com/users/geleems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geleems/subscriptions","organizations_url":"https://api.github.com/users/geleems/orgs","repos_url":"https://api.github.com/users/geleems/repos","events_url":"https://api.github.com/users/geleems/events{/privacy}","received_events_url":"https://api.github.com/users/geleems/received_events","type":"User","site_admin":false},"assignees":[{"login":"geleems","id":19577035,"avatar_url":"https://avatars.githubusercontent.com/u/19577035?v=3","gravatar_id":"","url":"https://api.github.com/users/geleems","html_url":"https://github.com/geleems","followers_url":"https://api.github.com/users/geleems/followers","following_url":"https://api.github.com/users/geleems/following{/other_user}","gists_url":"https://api.github.com/users/geleems/gists{/gist_id}","starred_url":"https://api.github.com/users/geleems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geleems/subscriptions","organizations_url":"https://api.github.com/users/geleems/orgs","repos_url":"https://api.github.com/users/geleems/repos","events_url":"https://api.github.com/users/geleems/events{/privacy}","received_events_url":"https://api.github.com/users/geleems/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/15742/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/15742/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/15742/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/52c3552b0c5975865cc1c944f411a39016769c90","head":{"label":"geleems:integauth_pr","ref":"integauth_pr","sha":"52c3552b0c5975865cc1c944f411a39016769c90","user":{"login":"geleems","id":19577035,"avatar_url":"https://avatars.githubusercontent.com/u/19577035?v=3","gravatar_id":"","url":"https://api.github.com/users/geleems","html_url":"https://github.com/geleems","followers_url":"https://api.github.com/users/geleems/followers","following_url":"https://api.github.com/users/geleems/following{/other_user}","gists_url":"https://api.github.com/users/geleems/gists{/gist_id}","starred_url":"https://api.github.com/users/geleems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geleems/subscriptions","organizations_url":"https://api.github.com/users/geleems/orgs","repos_url":"https://api.github.com/users/geleems/repos","events_url":"https://api.github.com/users/geleems/events{/privacy}","received_events_url":"https://api.github.com/users/geleems/received_events","type":"User","site_admin":false},"repo":{"id":78246835,"name":"corefx","full_name":"geleems/corefx","owner":{"login":"geleems","id":19577035,"avatar_url":"https://avatars.githubusercontent.com/u/19577035?v=3","gravatar_id":"","url":"https://api.github.com/users/geleems","html_url":"https://github.com/geleems","followers_url":"https://api.github.com/users/geleems/followers","following_url":"https://api.github.com/users/geleems/following{/other_user}","gists_url":"https://api.github.com/users/geleems/gists{/gist_id}","starred_url":"https://api.github.com/users/geleems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geleems/subscriptions","organizations_url":"https://api.github.com/users/geleems/orgs","repos_url":"https://api.github.com/users/geleems/repos","events_url":"https://api.github.com/users/geleems/events{/privacy}","received_events_url":"https://api.github.com/users/geleems/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geleems/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/geleems/corefx","forks_url":"https://api.github.com/repos/geleems/corefx/forks","keys_url":"https://api.github.com/repos/geleems/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geleems/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geleems/corefx/teams","hooks_url":"https://api.github.com/repos/geleems/corefx/hooks","issue_events_url":"https://api.github.com/repos/geleems/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/geleems/corefx/events","assignees_url":"https://api.github.com/repos/geleems/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/geleems/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/geleems/corefx/tags","blobs_url":"https://api.github.com/repos/geleems/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geleems/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geleems/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/geleems/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geleems/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/geleems/corefx/languages","stargazers_url":"https://api.github.com/repos/geleems/corefx/stargazers","contributors_url":"https://api.github.com/repos/geleems/corefx/contributors","subscribers_url":"https://api.github.com/repos/geleems/corefx/subscribers","subscription_url":"https://api.github.com/repos/geleems/corefx/subscription","commits_url":"https://api.github.com/repos/geleems/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/geleems/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/geleems/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/geleems/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/geleems/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/geleems/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geleems/corefx/merges","archive_url":"https://api.github.com/repos/geleems/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geleems/corefx/downloads","issues_url":"https://api.github.com/repos/geleems/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/geleems/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/geleems/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/geleems/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geleems/corefx/labels{/name}","releases_url":"https://api.github.com/repos/geleems/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/geleems/corefx/deployments","created_at":"2017-01-06T23:35:12Z","updated_at":"2017-01-06T23:35:45Z","pushed_at":"2017-02-09T01:00:22Z","git_url":"git://github.com/geleems/corefx.git","ssh_url":"git@github.com:geleems/corefx.git","clone_url":"https://github.com/geleems/corefx.git","svn_url":"https://github.com/geleems/corefx","homepage":"https://docs.microsoft.com/dotnet/","size":132597,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"c537ba673aa58ff60804d96d89611638c8680289","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefx/deployments","created_at":"2014-11-06T23:42:48Z","updated_at":"2017-02-08T22:23:12Z","pushed_at":"2017-02-09T01:58:06Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"https://docs.microsoft.com/dotnet/","size":132941,"stargazers_count":11215,"watchers_count":11215,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2911,"mirror_url":null,"open_issues_count":1388,"forks":2911,"open_issues":1388,"watchers":11215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/15742"},"html":{"href":"https://github.com/dotnet/corefx/pull/15742"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/15742"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/15742/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/15742/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/15742/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/52c3552b0c5975865cc1c944f411a39016769c90"}}}}
{"actor":{"display_login":"corivera"}}