GitHub PullRequestReviewCommentEvent at 2014-07-21 11:31:13
Repository: mono
Actor: marek-safar
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mono/mono/pulls/comments/15163802","id":15163802,"diff_hunk":"@@ -131,28 +149,30 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen\n \t\t\t}\n \n \t\t\tif ((components & UriComponents.Path) != 0) {\n+\t\t\t\tstring path = elements.path;\n \t\t\t\tif ((components & UriComponents.PathAndQuery) != 0 &&\n-\t\t\t\t\t(elements.path.Length == 0 || !elements.path.StartsWith (\"/\")))\n+\t\t\t\t\t(path.Length == 0 || !path.StartsWith (\"/\")) &&","path":"mcs/class/System/System/UriParser.cs","position":79,"original_position":79,"commit_id":"37dbbb2172d5fd56bf4393f3868ee43a606cf9bc","original_commit_id":"37dbbb2172d5fd56bf4393f3868ee43a606cf9bc","user":{"login":"marek-safar","id":250852,"avatar_url":"https://avatars.githubusercontent.com/u/250852?","gravatar_id":"9bbe9342b19d5815d5b8e78154287c06","url":"https://api.github.com/users/marek-safar","html_url":"https://github.com/marek-safar","followers_url":"https://api.github.com/users/marek-safar/followers","following_url":"https://api.github.com/users/marek-safar/following{/other_user}","gists_url":"https://api.github.com/users/marek-safar/gists{/gist_id}","starred_url":"https://api.github.com/users/marek-safar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marek-safar/subscriptions","organizations_url":"https://api.github.com/users/marek-safar/orgs","repos_url":"https://api.github.com/users/marek-safar/repos","events_url":"https://api.github.com/users/marek-safar/events{/privacy}","received_events_url":"https://api.github.com/users/marek-safar/received_events","type":"User","site_admin":false},"body":"Use StringComparison.Ordinal","created_at":"2014-07-21T11:31:13Z","updated_at":"2014-07-21T11:31:13Z","html_url":"https://github.com/mono/mono/pull/1168#discussion_r15163802","pull_request_url":"https://api.github.com/repos/mono/mono/pulls/1168","_links":{"self":{"href":"https://api.github.com/repos/mono/mono/pulls/comments/15163802"},"html":{"href":"https://github.com/mono/mono/pull/1168#discussion_r15163802"},"pull_request":{"href":"https://api.github.com/repos/mono/mono/pulls/1168"}}},"pull_request":{"url":"https://api.github.com/repos/mono/mono/pulls/1168","id":18546935,"html_url":"https://github.com/mono/mono/pull/1168","diff_url":"https://github.com/mono/mono/pull/1168.diff","patch_url":"https://github.com/mono/mono/pull/1168.patch","issue_url":"https://api.github.com/repos/mono/mono/issues/1168","number":1168,"state":"open","title":"IriParsing","user":{"login":"esdrubal","id":1188095,"avatar_url":"https://avatars.githubusercontent.com/u/1188095?","gravatar_id":"e10c1f42b2a437b58c4eac706be99097","url":"https://api.github.com/users/esdrubal","html_url":"https://github.com/esdrubal","followers_url":"https://api.github.com/users/esdrubal/followers","following_url":"https://api.github.com/users/esdrubal/following{/other_user}","gists_url":"https://api.github.com/users/esdrubal/gists{/gist_id}","starred_url":"https://api.github.com/users/esdrubal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esdrubal/subscriptions","organizations_url":"https://api.github.com/users/esdrubal/orgs","repos_url":"https://api.github.com/users/esdrubal/repos","events_url":"https://api.github.com/users/esdrubal/events{/privacy}","received_events_url":"https://api.github.com/users/esdrubal/received_events","type":"User","site_admin":false},"body":"**Major changes:**\r\n\r\nAdded property IriParsing to System/Uri.cs that switches between .NET 4.5 and .NET 4.0 default parsing behavior.\r\nThe property value can be initialized from the environment variable MONO_URI_IRIPARSING, and reflection can be used to change the field s_IriParsing.\r\n\r\nCreated System/UriHelper.cs with methods FormatAbsolute and FormatRelative used to escape, unescape characters, replace backslash, and reduce paths depending on scheme, UriComponent, UriFormat and some flags that can be provided.\r\n\r\nChanged  System/Uri.cs and System/UriParser.cs  to use UriHelper.FormatAbsolute and UriHelper.FormatRelative.\r\n\r\nChanged System/UriParseComponents.cs to handle IpV6 hosts, Unix/Windows paths.\r\n\r\nAdded Test/System/StringTester.cs that generates/saves or loads/asserts expected values.\r\n\r\nAdded Test/System/UriPermutationsTest.cs that generates or asserts the Uri methods and properties output for multiple combinations of scheme (http, https, ...), location (path, fragment, query), encoded and decoded characters (all ASCII, some Unicode), reduce paths.\r\n    \r\nUpdated existing tests Test/System/UriTest.cs and Test/System/UriTest2.cs with the IriParsing behavior differences.\r\n\r\n**To Do:**\r\n\r\nAlthough the new IriParsing behavior is implemented and tests are passing, a code refactoring of some replicated code should be done.\r\n\r\nThe same kind of parsing logic was and is now even more replicated in 3 different places Uri.Merge, Uri.ParseNoException and UriParseComponents.ParseComponents.\r\n\r\nThe plan is to improve UriParseComponents.ParseComponents to check Uri validity and return errors, as well as data other than components as isUnc, isAbsoluteUri, scope_id. Then Uri.Merge and Uri.ParseNoException will be able to use UriParseComponents.ParseComponents  allowing the removal of the replicated code from Uri.cs.\r\n\r\n**Tests to fix:**\r\n\r\n- UriBuilderTest.IPv6_Host\r\n- UriPermutationsTest.PercentageEncoding_LocalPath\r\n- UriPermutationsTest.Reduce_LocalPath\r\n- UriTest.HexUnescapeMultiByte\r\n- UriTest.Unescape","created_at":"2014-07-17T18:52:48Z","updated_at":"2014-07-21T11:31:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"884e34d3b6e363136f60df031e02ffc04eeabba5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mono/mono/pulls/1168/commits","review_comments_url":"https://api.github.com/repos/mono/mono/pulls/1168/comments","review_comment_url":"https://api.github.com/repos/mono/mono/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mono/mono/issues/1168/comments","statuses_url":"https://api.github.com/repos/mono/mono/statuses/37dbbb2172d5fd56bf4393f3868ee43a606cf9bc","head":{"label":"esdrubal:iriparsing","ref":"iriparsing","sha":"37dbbb2172d5fd56bf4393f3868ee43a606cf9bc","user":{"login":"esdrubal","id":1188095,"avatar_url":"https://avatars.githubusercontent.com/u/1188095?","gravatar_id":"e10c1f42b2a437b58c4eac706be99097","url":"https://api.github.com/users/esdrubal","html_url":"https://github.com/esdrubal","followers_url":"https://api.github.com/users/esdrubal/followers","following_url":"https://api.github.com/users/esdrubal/following{/other_user}","gists_url":"https://api.github.com/users/esdrubal/gists{/gist_id}","starred_url":"https://api.github.com/users/esdrubal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esdrubal/subscriptions","organizations_url":"https://api.github.com/users/esdrubal/orgs","repos_url":"https://api.github.com/users/esdrubal/repos","events_url":"https://api.github.com/users/esdrubal/events{/privacy}","received_events_url":"https://api.github.com/users/esdrubal/received_events","type":"User","site_admin":false},"repo":{"id":19627257,"name":"mono","full_name":"esdrubal/mono","owner":{"login":"esdrubal","id":1188095,"avatar_url":"https://avatars.githubusercontent.com/u/1188095?","gravatar_id":"e10c1f42b2a437b58c4eac706be99097","url":"https://api.github.com/users/esdrubal","html_url":"https://github.com/esdrubal","followers_url":"https://api.github.com/users/esdrubal/followers","following_url":"https://api.github.com/users/esdrubal/following{/other_user}","gists_url":"https://api.github.com/users/esdrubal/gists{/gist_id}","starred_url":"https://api.github.com/users/esdrubal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esdrubal/subscriptions","organizations_url":"https://api.github.com/users/esdrubal/orgs","repos_url":"https://api.github.com/users/esdrubal/repos","events_url":"https://api.github.com/users/esdrubal/events{/privacy}","received_events_url":"https://api.github.com/users/esdrubal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esdrubal/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":true,"url":"https://api.github.com/repos/esdrubal/mono","forks_url":"https://api.github.com/repos/esdrubal/mono/forks","keys_url":"https://api.github.com/repos/esdrubal/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esdrubal/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esdrubal/mono/teams","hooks_url":"https://api.github.com/repos/esdrubal/mono/hooks","issue_events_url":"https://api.github.com/repos/esdrubal/mono/issues/events{/number}","events_url":"https://api.github.com/repos/esdrubal/mono/events","assignees_url":"https://api.github.com/repos/esdrubal/mono/assignees{/user}","branches_url":"https://api.github.com/repos/esdrubal/mono/branches{/branch}","tags_url":"https://api.github.com/repos/esdrubal/mono/tags","blobs_url":"https://api.github.com/repos/esdrubal/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esdrubal/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esdrubal/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/esdrubal/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esdrubal/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/esdrubal/mono/languages","stargazers_url":"https://api.github.com/repos/esdrubal/mono/stargazers","contributors_url":"https://api.github.com/repos/esdrubal/mono/contributors","subscribers_url":"https://api.github.com/repos/esdrubal/mono/subscribers","subscription_url":"https://api.github.com/repos/esdrubal/mono/subscription","commits_url":"https://api.github.com/repos/esdrubal/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/esdrubal/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/esdrubal/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/esdrubal/mono/issues/comments/{number}","contents_url":"https://api.github.com/repos/esdrubal/mono/contents/{+path}","compare_url":"https://api.github.com/repos/esdrubal/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esdrubal/mono/merges","archive_url":"https://api.github.com/repos/esdrubal/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esdrubal/mono/downloads","issues_url":"https://api.github.com/repos/esdrubal/mono/issues{/number}","pulls_url":"https://api.github.com/repos/esdrubal/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/esdrubal/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/esdrubal/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esdrubal/mono/labels{/name}","releases_url":"https://api.github.com/repos/esdrubal/mono/releases{/id}","created_at":"2014-05-09T22:14:45Z","updated_at":"2014-07-01T13:42:03Z","pushed_at":"2014-07-17T18:24:54Z","git_url":"git://github.com/esdrubal/mono.git","ssh_url":"git@github.com:esdrubal/mono.git","clone_url":"https://github.com/esdrubal/mono.git","svn_url":"https://github.com/esdrubal/mono","homepage":"http://www.mono-project.com/","size":364265,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mono:master","ref":"master","sha":"896ceb1d9aeef01fcdb51239b8a766ddcf5f68be","user":{"login":"mono","id":53395,"avatar_url":"https://avatars.githubusercontent.com/u/53395?","gravatar_id":"f275a99c0b4e6044d3e81daf445f8174","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791611,"name":"mono","full_name":"mono/mono","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars.githubusercontent.com/u/53395?","gravatar_id":"f275a99c0b4e6044d3e81daf445f8174","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":false,"url":"https://api.github.com/repos/mono/mono","forks_url":"https://api.github.com/repos/mono/mono/forks","keys_url":"https://api.github.com/repos/mono/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/mono/teams","hooks_url":"https://api.github.com/repos/mono/mono/hooks","issue_events_url":"https://api.github.com/repos/mono/mono/issues/events{/number}","events_url":"https://api.github.com/repos/mono/mono/events","assignees_url":"https://api.github.com/repos/mono/mono/assignees{/user}","branches_url":"https://api.github.com/repos/mono/mono/branches{/branch}","tags_url":"https://api.github.com/repos/mono/mono/tags","blobs_url":"https://api.github.com/repos/mono/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/mono/languages","stargazers_url":"https://api.github.com/repos/mono/mono/stargazers","contributors_url":"https://api.github.com/repos/mono/mono/contributors","subscribers_url":"https://api.github.com/repos/mono/mono/subscribers","subscription_url":"https://api.github.com/repos/mono/mono/subscription","commits_url":"https://api.github.com/repos/mono/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/mono/issues/comments/{number}","contents_url":"https://api.github.com/repos/mono/mono/contents/{+path}","compare_url":"https://api.github.com/repos/mono/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/mono/merges","archive_url":"https://api.github.com/repos/mono/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/mono/downloads","issues_url":"https://api.github.com/repos/mono/mono/issues{/number}","pulls_url":"https://api.github.com/repos/mono/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/mono/labels{/name}","releases_url":"https://api.github.com/repos/mono/mono/releases{/id}","created_at":"2010-07-22T18:06:36Z","updated_at":"2014-07-21T05:23:24Z","pushed_at":"2014-07-21T10:22:12Z","git_url":"git://github.com/mono/mono.git","ssh_url":"git@github.com:mono/mono.git","clone_url":"https://github.com/mono/mono.git","svn_url":"https://github.com/mono/mono","homepage":"http://www.mono-project.com/","size":1265546,"stargazers_count":2312,"watchers_count":2312,"language":"C#","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":1202,"mirror_url":null,"open_issues_count":62,"forks":1202,"open_issues":62,"watchers":2312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono/mono/pulls/1168"},"html":{"href":"https://github.com/mono/mono/pull/1168"},"issue":{"href":"https://api.github.com/repos/mono/mono/issues/1168"},"comments":{"href":"https://api.github.com/repos/mono/mono/issues/1168/comments"},"review_comments":{"href":"https://api.github.com/repos/mono/mono/pulls/1168/comments"},"review_comment":{"href":"https://api.github.com/repos/mono/mono/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mono/mono/pulls/1168/commits"},"statuses":{"href":"https://api.github.com/repos/mono/mono/statuses/37dbbb2172d5fd56bf4393f3868ee43a606cf9bc"}}}}