{"action":"created","comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments/192138569","pull_request_review_id":124854887,"id":192138569,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjEzODU2OQ==","diff_hunk":"@@ -651,7 +651,11 @@ class HTTP::Client\n     socket = @socket\n     return socket if socket\n \n-    socket = TCPSocket.new @host, @port, @dns_timeout, @connect_timeout\n+    # URI host may have ipv6 enclosed by brackets and is fine according to\n+    # rfc3986. The host http header must contains the brackets, ie: the same\n+    # value as returned by URI#host\n+    ip_host = @host[0] == '[' && @host[-1] == ']' ? @host[1..-2] : @host","path":"src/http/client.cr","position":8,"original_position":8,"commit_id":"7f478a71fcf4fffb328837a40ecb370192fc70eb","original_commit_id":"66b2d745e401f987ef8d0147743a2d23ea9f35e0","user":{"login":"j8r","id":6562667,"node_id":"MDQ6VXNlcjY1NjI2Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/6562667?v=4","gravatar_id":"","url":"https://api.github.com/users/j8r","html_url":"https://github.com/j8r","followers_url":"https://api.github.com/users/j8r/followers","following_url":"https://api.github.com/users/j8r/following{/other_user}","gists_url":"https://api.github.com/users/j8r/gists{/gist_id}","starred_url":"https://api.github.com/users/j8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j8r/subscriptions","organizations_url":"https://api.github.com/users/j8r/orgs","repos_url":"https://api.github.com/users/j8r/repos","events_url":"https://api.github.com/users/j8r/events{/privacy}","received_events_url":"https://api.github.com/users/j8r/received_events","type":"User","site_admin":false},"body":"Sorry for the mistake, I confuse the two. Change `strip` to `chop` to have `lchop.rchop`\r\nWith chops the program is slower","created_at":"2018-05-31T15:24:06Z","updated_at":"2018-05-31T15:24:06Z","html_url":"https://github.com/crystal-lang/crystal/pull/6147#discussion_r192138569","pull_request_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments/192138569"},"html":{"href":"https://github.com/crystal-lang/crystal/pull/6147#discussion_r192138569"},"pull_request":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147"}},"in_reply_to_id":192034724},"pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147","id":191681899,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjgxODk5","html_url":"https://github.com/crystal-lang/crystal/pull/6147","diff_url":"https://github.com/crystal-lang/crystal/pull/6147.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/6147.patch","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6147","number":6147,"state":"open","locked":false,"title":"Allow HTTP::Client to use ipv6 addresses","user":{"login":"bcardiff","id":459923,"node_id":"MDQ6VXNlcjQ1OTkyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/459923?v=4","gravatar_id":"","url":"https://api.github.com/users/bcardiff","html_url":"https://github.com/bcardiff","followers_url":"https://api.github.com/users/bcardiff/followers","following_url":"https://api.github.com/users/bcardiff/following{/other_user}","gists_url":"https://api.github.com/users/bcardiff/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardiff/subscriptions","organizations_url":"https://api.github.com/users/bcardiff/orgs","repos_url":"https://api.github.com/users/bcardiff/repos","events_url":"https://api.github.com/users/bcardiff/events{/privacy}","received_events_url":"https://api.github.com/users/bcardiff/received_events","type":"User","site_admin":false},"body":"Fixes #5514 \r\n\r\nThe `URI#host` is fine to have the brackets since they are part of rfc3986 host description.\r\nThe `HTTP::Client` needs to extract them before creating the `TCPSocket`.","created_at":"2018-05-31T08:39:26Z","updated_at":"2018-05-31T15:24:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cf68ad22024f63d62026ed5e92de651517a2aae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147/commits","review_comments_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147/comments","review_comment_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6147/comments","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/7f478a71fcf4fffb328837a40ecb370192fc70eb","head":{"label":"bcardiff:fix/uri-ipv6","ref":"fix/uri-ipv6","sha":"7f478a71fcf4fffb328837a40ecb370192fc70eb","user":{"login":"bcardiff","id":459923,"node_id":"MDQ6VXNlcjQ1OTkyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/459923?v=4","gravatar_id":"","url":"https://api.github.com/users/bcardiff","html_url":"https://github.com/bcardiff","followers_url":"https://api.github.com/users/bcardiff/followers","following_url":"https://api.github.com/users/bcardiff/following{/other_user}","gists_url":"https://api.github.com/users/bcardiff/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardiff/subscriptions","organizations_url":"https://api.github.com/users/bcardiff/orgs","repos_url":"https://api.github.com/users/bcardiff/repos","events_url":"https://api.github.com/users/bcardiff/events{/privacy}","received_events_url":"https://api.github.com/users/bcardiff/received_events","type":"User","site_admin":false},"repo":{"id":39784153,"node_id":"MDEwOlJlcG9zaXRvcnkzOTc4NDE1Mw==","name":"crystal","full_name":"bcardiff/crystal","owner":{"login":"bcardiff","id":459923,"node_id":"MDQ6VXNlcjQ1OTkyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/459923?v=4","gravatar_id":"","url":"https://api.github.com/users/bcardiff","html_url":"https://github.com/bcardiff","followers_url":"https://api.github.com/users/bcardiff/followers","following_url":"https://api.github.com/users/bcardiff/following{/other_user}","gists_url":"https://api.github.com/users/bcardiff/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardiff/subscriptions","organizations_url":"https://api.github.com/users/bcardiff/orgs","repos_url":"https://api.github.com/users/bcardiff/repos","events_url":"https://api.github.com/users/bcardiff/events{/privacy}","received_events_url":"https://api.github.com/users/bcardiff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcardiff/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/bcardiff/crystal","forks_url":"https://api.github.com/repos/bcardiff/crystal/forks","keys_url":"https://api.github.com/repos/bcardiff/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcardiff/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcardiff/crystal/teams","hooks_url":"https://api.github.com/repos/bcardiff/crystal/hooks","issue_events_url":"https://api.github.com/repos/bcardiff/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/bcardiff/crystal/events","assignees_url":"https://api.github.com/repos/bcardiff/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/bcardiff/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/bcardiff/crystal/tags","blobs_url":"https://api.github.com/repos/bcardiff/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcardiff/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcardiff/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcardiff/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcardiff/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/bcardiff/crystal/languages","stargazers_url":"https://api.github.com/repos/bcardiff/crystal/stargazers","contributors_url":"https://api.github.com/repos/bcardiff/crystal/contributors","subscribers_url":"https://api.github.com/repos/bcardiff/crystal/subscribers","subscription_url":"https://api.github.com/repos/bcardiff/crystal/subscription","commits_url":"https://api.github.com/repos/bcardiff/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcardiff/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcardiff/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcardiff/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcardiff/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/bcardiff/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcardiff/crystal/merges","archive_url":"https://api.github.com/repos/bcardiff/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcardiff/crystal/downloads","issues_url":"https://api.github.com/repos/bcardiff/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/bcardiff/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/bcardiff/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/bcardiff/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcardiff/crystal/labels{/name}","releases_url":"https://api.github.com/repos/bcardiff/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/bcardiff/crystal/deployments","created_at":"2015-07-27T16:05:38Z","updated_at":"2016-01-28T19:54:21Z","pushed_at":"2018-05-31T10:08:31Z","git_url":"git://github.com/bcardiff/crystal.git","ssh_url":"git@github.com:bcardiff/crystal.git","clone_url":"https://github.com/bcardiff/crystal.git","svn_url":"https://github.com/bcardiff/crystal","homepage":"http://crystal-lang.org","size":44961,"stargazers_count":0,"watchers_count":0,"language":"Crystal","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crystal-lang:master","ref":"master","sha":"61da45f2dd96c57e0d2757257b0b6a5ca0689b7a","user":{"login":"crystal-lang","id":6539796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1Mzk3OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/6539796?v=4","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"node_id":"MDEwOlJlcG9zaXRvcnk2ODg3ODEz","name":"crystal","full_name":"crystal-lang/crystal","owner":{"login":"crystal-lang","id":6539796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1Mzk3OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/6539796?v=4","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crystal-lang/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/crystal-lang/crystal","forks_url":"https://api.github.com/repos/crystal-lang/crystal/forks","keys_url":"https://api.github.com/repos/crystal-lang/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crystal-lang/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crystal-lang/crystal/teams","hooks_url":"https://api.github.com/repos/crystal-lang/crystal/hooks","issue_events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/crystal-lang/crystal/events","assignees_url":"https://api.github.com/repos/crystal-lang/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/crystal-lang/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/crystal-lang/crystal/tags","blobs_url":"https://api.github.com/repos/crystal-lang/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crystal-lang/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crystal-lang/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/crystal-lang/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/crystal-lang/crystal/languages","stargazers_url":"https://api.github.com/repos/crystal-lang/crystal/stargazers","contributors_url":"https://api.github.com/repos/crystal-lang/crystal/contributors","subscribers_url":"https://api.github.com/repos/crystal-lang/crystal/subscribers","subscription_url":"https://api.github.com/repos/crystal-lang/crystal/subscription","commits_url":"https://api.github.com/repos/crystal-lang/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/crystal-lang/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/crystal-lang/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/crystal-lang/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crystal-lang/crystal/merges","archive_url":"https://api.github.com/repos/crystal-lang/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crystal-lang/crystal/downloads","issues_url":"https://api.github.com/repos/crystal-lang/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/crystal-lang/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/crystal-lang/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/crystal-lang/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crystal-lang/crystal/labels{/name}","releases_url":"https://api.github.com/repos/crystal-lang/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/crystal-lang/crystal/deployments","created_at":"2012-11-27T17:32:32Z","updated_at":"2018-05-31T14:34:28Z","pushed_at":"2018-05-31T10:08:34Z","git_url":"git://github.com/crystal-lang/crystal.git","ssh_url":"git@github.com:crystal-lang/crystal.git","clone_url":"https://github.com/crystal-lang/crystal.git","svn_url":"https://github.com/crystal-lang/crystal","homepage":"https://crystal-lang.org","size":36924,"stargazers_count":10868,"watchers_count":10868,"language":"Crystal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":856,"mirror_url":null,"archived":false,"open_issues_count":655,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":856,"open_issues":655,"watchers":10868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147"},"html":{"href":"https://github.com/crystal-lang/crystal/pull/6147"},"issue":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/6147"},"comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/6147/comments"},"review_comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147/comments"},"review_comment":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/6147/commits"},"statuses":{"href":"https://api.github.com/repos/crystal-lang/crystal/statuses/7f478a71fcf4fffb328837a40ecb370192fc70eb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"j8r"}}