{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/comments/30904741","id":30904741,"diff_hunk":"@@ -250,13 +253,19 @@ func handleHTTP(router *weave.Router, httpAddr string, allocator *ipam.Allocator\n \t})\n \n \tmuxRouter.Methods(\"POST\").Path(\"/connect\").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n-\t\tif err := router.ConnectionMaker.InitiateConnection(r.FormValue(\"peer\")); err != nil {\n-\t\t\thttp.Error(w, fmt.Sprint(\"invalid peer address: \", err), http.StatusBadRequest)\n+\t\tif err := r.ParseForm(); err != nil {\n+\t\t\thttp.Error(w, fmt.Sprint(\"unable to parse form: \", err), http.StatusBadRequest)\n+\t\t}\n+\t\tif errors := router.ConnectionMaker.InitiateConnections(r.Form[\"peer\"]); len(errors) > 0 {\n+\t\t\thttp.Error(w, fmt.Sprint(\"invalid peer addresses:\\n\", strings.Join(errorMessages(errors), \"\\n\")), http.StatusBadRequest)","path":"weaver/main.go","position":83,"original_position":83,"commit_id":"fb82dd743ae57fd4d29d60d5b8945b258e6673ce","original_commit_id":"fb82dd743ae57fd4d29d60d5b8945b258e6673ce","user":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"body":"That \"invalid peer addresses:\\n\" looks quite gross in the CLI. Drop it.","created_at":"2015-05-22T15:26:33Z","updated_at":"2015-05-22T15:26:33Z","html_url":"https://github.com/weaveworks/weave/pull/697#discussion_r30904741","pull_request_url":"https://api.github.com/repos/weaveworks/weave/pulls/697","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments/30904741"},"html":{"href":"https://github.com/weaveworks/weave/pull/697#discussion_r30904741"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/697"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/697","id":35714446,"html_url":"https://github.com/weaveworks/weave/pull/697","diff_url":"https://github.com/weaveworks/weave/pull/697.diff","patch_url":"https://github.com/weaveworks/weave/pull/697.patch","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/697","number":697,"state":"open","locked":false,"title":"weave connect/forget take multiple peers","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"body":"A first step towards solving #656.\r\n\r\nAre there some tests for this that should be updated?","created_at":"2015-05-19T10:09:29Z","updated_at":"2015-05-22T15:26:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52eb3dd2f3050777d250f9cca8e46c3b92f2458b","assignee":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/weave/pulls/697/commits","review_comments_url":"https://api.github.com/repos/weaveworks/weave/pulls/697/comments","review_comment_url":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/697/comments","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/fb82dd743ae57fd4d29d60d5b8945b258e6673ce","head":{"label":"paulbellamy:peer-replacement","ref":"peer-replacement","sha":"fb82dd743ae57fd4d29d60d5b8945b258e6673ce","user":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"repo":{"id":35087430,"name":"weave","full_name":"paulbellamy/weave","owner":{"login":"paulbellamy","id":250199,"avatar_url":"https://avatars.githubusercontent.com/u/250199?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbellamy","html_url":"https://github.com/paulbellamy","followers_url":"https://api.github.com/users/paulbellamy/followers","following_url":"https://api.github.com/users/paulbellamy/following{/other_user}","gists_url":"https://api.github.com/users/paulbellamy/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbellamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbellamy/subscriptions","organizations_url":"https://api.github.com/users/paulbellamy/orgs","repos_url":"https://api.github.com/users/paulbellamy/repos","events_url":"https://api.github.com/users/paulbellamy/events{/privacy}","received_events_url":"https://api.github.com/users/paulbellamy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulbellamy/weave","description":"The Docker Network","fork":true,"url":"https://api.github.com/repos/paulbellamy/weave","forks_url":"https://api.github.com/repos/paulbellamy/weave/forks","keys_url":"https://api.github.com/repos/paulbellamy/weave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulbellamy/weave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulbellamy/weave/teams","hooks_url":"https://api.github.com/repos/paulbellamy/weave/hooks","issue_events_url":"https://api.github.com/repos/paulbellamy/weave/issues/events{/number}","events_url":"https://api.github.com/repos/paulbellamy/weave/events","assignees_url":"https://api.github.com/repos/paulbellamy/weave/assignees{/user}","branches_url":"https://api.github.com/repos/paulbellamy/weave/branches{/branch}","tags_url":"https://api.github.com/repos/paulbellamy/weave/tags","blobs_url":"https://api.github.com/repos/paulbellamy/weave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulbellamy/weave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulbellamy/weave/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulbellamy/weave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulbellamy/weave/statuses/{sha}","languages_url":"https://api.github.com/repos/paulbellamy/weave/languages","stargazers_url":"https://api.github.com/repos/paulbellamy/weave/stargazers","contributors_url":"https://api.github.com/repos/paulbellamy/weave/contributors","subscribers_url":"https://api.github.com/repos/paulbellamy/weave/subscribers","subscription_url":"https://api.github.com/repos/paulbellamy/weave/subscription","commits_url":"https://api.github.com/repos/paulbellamy/weave/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulbellamy/weave/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulbellamy/weave/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulbellamy/weave/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulbellamy/weave/contents/{+path}","compare_url":"https://api.github.com/repos/paulbellamy/weave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulbellamy/weave/merges","archive_url":"https://api.github.com/repos/paulbellamy/weave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulbellamy/weave/downloads","issues_url":"https://api.github.com/repos/paulbellamy/weave/issues{/number}","pulls_url":"https://api.github.com/repos/paulbellamy/weave/pulls{/number}","milestones_url":"https://api.github.com/repos/paulbellamy/weave/milestones{/number}","notifications_url":"https://api.github.com/repos/paulbellamy/weave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulbellamy/weave/labels{/name}","releases_url":"https://api.github.com/repos/paulbellamy/weave/releases{/id}","created_at":"2015-05-05T08:29:04Z","updated_at":"2015-05-08T10:26:31Z","pushed_at":"2015-05-22T14:52:43Z","git_url":"git://github.com/paulbellamy/weave.git","ssh_url":"git@github.com:paulbellamy/weave.git","clone_url":"https://github.com/paulbellamy/weave.git","svn_url":"https://github.com/paulbellamy/weave","homepage":"http://weave.works","size":2675,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"weaveworks:master","ref":"master","sha":"22b8f482eabff4d62fb9c60e6708864d8097715f","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":23059575,"name":"weave","full_name":"weaveworks/weave","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/weave","description":"The Docker Network","fork":false,"url":"https://api.github.com/repos/weaveworks/weave","forks_url":"https://api.github.com/repos/weaveworks/weave/forks","keys_url":"https://api.github.com/repos/weaveworks/weave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/weave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/weave/teams","hooks_url":"https://api.github.com/repos/weaveworks/weave/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/weave/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/weave/events","assignees_url":"https://api.github.com/repos/weaveworks/weave/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/weave/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/weave/tags","blobs_url":"https://api.github.com/repos/weaveworks/weave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/weave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/weave/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/weave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/weave/languages","stargazers_url":"https://api.github.com/repos/weaveworks/weave/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/weave/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/weave/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/weave/subscription","commits_url":"https://api.github.com/repos/weaveworks/weave/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/weave/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/weave/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/weave/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/weave/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/weave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/weave/merges","archive_url":"https://api.github.com/repos/weaveworks/weave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/weave/downloads","issues_url":"https://api.github.com/repos/weaveworks/weave/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/weave/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/weave/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/weave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/weave/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/weave/releases{/id}","created_at":"2014-08-18T05:19:07Z","updated_at":"2015-05-22T14:23:37Z","pushed_at":"2015-05-22T15:11:45Z","git_url":"git://github.com/weaveworks/weave.git","ssh_url":"git@github.com:weaveworks/weave.git","clone_url":"https://github.com/weaveworks/weave.git","svn_url":"https://github.com/weaveworks/weave","homepage":"http://weave.works","size":12261,"stargazers_count":3315,"watchers_count":3315,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":177,"mirror_url":null,"open_issues_count":130,"forks":177,"open_issues":130,"watchers":3315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/697"},"html":{"href":"https://github.com/weaveworks/weave/pull/697"},"issue":{"href":"https://api.github.com/repos/weaveworks/weave/issues/697"},"comments":{"href":"https://api.github.com/repos/weaveworks/weave/issues/697/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/697/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/697/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/weave/statuses/fb82dd743ae57fd4d29d60d5b8945b258e6673ce"}}}}