{"action":"created","comment":{"url":"https://api.github.com/repos/getlantern/lantern/pulls/comments/35815096","id":35815096,"diff_hunk":"@@ -147,17 +147,17 @@ func (server *Server) Serve(l net.Listener) error {\n \tif server.AllowNonGlobalDestinations {\n \t\tproxy.Allow = server.Allow\n \t} else {\n-\t\tproxy.Allow = func(req *http.Request, destAddr string) error {\n-\t\t\terr := server.checkForNonGlobalDestination(destAddr)\n+\t\tproxy.Allow = func(req *http.Request, destAddr string) (int, error) {\n+\t\t\tcode, err := server.checkForNonGlobalDestination(destAddr)\n \t\t\tif err != nil {\n-\t\t\t\treturn err\n+\t\t\t\treturn code, err\n \t\t\t}\n \n \t\t\tif server.Allow != nil {\n \t\t\t\treturn server.Allow(req, destAddr)\n \t\t\t}\n \n-\t\t\treturn nil\n+\t\t\treturn http.StatusOK, nil","path":"src/github.com/getlantern/fronted/server.go","position":27,"original_position":27,"commit_id":"e6e97b8cc0946530f75bd73738b11bc2377fe3c6","original_commit_id":"e6e97b8cc0946530f75bd73738b11bc2377fe3c6","user":{"login":"myleshorton","id":1143966,"avatar_url":"https://avatars.githubusercontent.com/u/1143966?v=3","gravatar_id":"","url":"https://api.github.com/users/myleshorton","html_url":"https://github.com/myleshorton","followers_url":"https://api.github.com/users/myleshorton/followers","following_url":"https://api.github.com/users/myleshorton/following{/other_user}","gists_url":"https://api.github.com/users/myleshorton/gists{/gist_id}","starred_url":"https://api.github.com/users/myleshorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleshorton/subscriptions","organizations_url":"https://api.github.com/users/myleshorton/orgs","repos_url":"https://api.github.com/users/myleshorton/repos","events_url":"https://api.github.com/users/myleshorton/events{/privacy}","received_events_url":"https://api.github.com/users/myleshorton/received_events","type":"User","site_admin":false},"body":"The OK status isn't really used in practice, but we need to return something.","created_at":"2015-07-29T21:36:04Z","updated_at":"2015-07-29T21:36:04Z","html_url":"https://github.com/getlantern/lantern/pull/2848#discussion_r35815096","pull_request_url":"https://api.github.com/repos/getlantern/lantern/pulls/2848","_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/comments/35815096"},"html":{"href":"https://github.com/getlantern/lantern/pull/2848#discussion_r35815096"},"pull_request":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/2848"}}},"pull_request":{"url":"https://api.github.com/repos/getlantern/lantern/pulls/2848","id":41174893,"html_url":"https://github.com/getlantern/lantern/pull/2848","diff_url":"https://github.com/getlantern/lantern/pull/2848.diff","patch_url":"https://github.com/getlantern/lantern/pull/2848.patch","issue_url":"https://api.github.com/repos/getlantern/lantern/issues/2848","number":2848,"state":"open","locked":false,"title":"Improved granularity of error codes closes #2847","user":{"login":"myleshorton","id":1143966,"avatar_url":"https://avatars.githubusercontent.com/u/1143966?v=3","gravatar_id":"","url":"https://api.github.com/users/myleshorton","html_url":"https://github.com/myleshorton","followers_url":"https://api.github.com/users/myleshorton/followers","following_url":"https://api.github.com/users/myleshorton/following{/other_user}","gists_url":"https://api.github.com/users/myleshorton/gists{/gist_id}","starred_url":"https://api.github.com/users/myleshorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleshorton/subscriptions","organizations_url":"https://api.github.com/users/myleshorton/orgs","repos_url":"https://api.github.com/users/myleshorton/repos","events_url":"https://api.github.com/users/myleshorton/events{/privacy}","received_events_url":"https://api.github.com/users/myleshorton/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-29T21:33:20Z","updated_at":"2015-07-29T21:36:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"078cf9b5e82e19caaad9e52bf1711a929f6ced56","assignee":{"login":"xiam","id":385670,"avatar_url":"https://avatars.githubusercontent.com/u/385670?v=3","gravatar_id":"","url":"https://api.github.com/users/xiam","html_url":"https://github.com/xiam","followers_url":"https://api.github.com/users/xiam/followers","following_url":"https://api.github.com/users/xiam/following{/other_user}","gists_url":"https://api.github.com/users/xiam/gists{/gist_id}","starred_url":"https://api.github.com/users/xiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiam/subscriptions","organizations_url":"https://api.github.com/users/xiam/orgs","repos_url":"https://api.github.com/users/xiam/repos","events_url":"https://api.github.com/users/xiam/events{/privacy}","received_events_url":"https://api.github.com/users/xiam/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/getlantern/lantern/pulls/2848/commits","review_comments_url":"https://api.github.com/repos/getlantern/lantern/pulls/2848/comments","review_comment_url":"https://api.github.com/repos/getlantern/lantern/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getlantern/lantern/issues/2848/comments","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/e6e97b8cc0946530f75bd73738b11bc2377fe3c6","head":{"label":"getlantern:issue2847","ref":"issue2847","sha":"e6e97b8cc0946530f75bd73738b11bc2377fe3c6","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":1380117,"name":"lantern","full_name":"getlantern/lantern","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/lantern","description":"Open Internet for Everyone. Lantern is a free desktop application that delivers fast, reliable and secure access to the open Internet.","fork":false,"url":"https://api.github.com/repos/getlantern/lantern","forks_url":"https://api.github.com/repos/getlantern/lantern/forks","keys_url":"https://api.github.com/repos/getlantern/lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern/events","assignees_url":"https://api.github.com/repos/getlantern/lantern/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern/merges","archive_url":"https://api.github.com/repos/getlantern/lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern/releases{/id}","created_at":"2011-02-17T22:12:29Z","updated_at":"2015-07-29T12:38:11Z","pushed_at":"2015-07-29T21:33:22Z","git_url":"git://github.com/getlantern/lantern.git","ssh_url":"git@github.com:getlantern/lantern.git","clone_url":"https://github.com/getlantern/lantern.git","svn_url":"https://github.com/getlantern/lantern","homepage":"https://getlantern.org","size":919035,"stargazers_count":1406,"watchers_count":1406,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":298,"mirror_url":null,"open_issues_count":314,"forks":298,"open_issues":314,"watchers":1406,"default_branch":"valencia"}},"base":{"label":"getlantern:valencia","ref":"valencia","sha":"1cee1a478de23762b857c7f29031e15b935af3cf","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":1380117,"name":"lantern","full_name":"getlantern/lantern","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/lantern","description":"Open Internet for Everyone. Lantern is a free desktop application that delivers fast, reliable and secure access to the open Internet.","fork":false,"url":"https://api.github.com/repos/getlantern/lantern","forks_url":"https://api.github.com/repos/getlantern/lantern/forks","keys_url":"https://api.github.com/repos/getlantern/lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern/events","assignees_url":"https://api.github.com/repos/getlantern/lantern/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern/merges","archive_url":"https://api.github.com/repos/getlantern/lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern/releases{/id}","created_at":"2011-02-17T22:12:29Z","updated_at":"2015-07-29T12:38:11Z","pushed_at":"2015-07-29T21:33:22Z","git_url":"git://github.com/getlantern/lantern.git","ssh_url":"git@github.com:getlantern/lantern.git","clone_url":"https://github.com/getlantern/lantern.git","svn_url":"https://github.com/getlantern/lantern","homepage":"https://getlantern.org","size":919035,"stargazers_count":1406,"watchers_count":1406,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":298,"mirror_url":null,"open_issues_count":314,"forks":298,"open_issues":314,"watchers":1406,"default_branch":"valencia"}},"_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/2848"},"html":{"href":"https://github.com/getlantern/lantern/pull/2848"},"issue":{"href":"https://api.github.com/repos/getlantern/lantern/issues/2848"},"comments":{"href":"https://api.github.com/repos/getlantern/lantern/issues/2848/comments"},"review_comments":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/2848/comments"},"review_comment":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/2848/commits"},"statuses":{"href":"https://api.github.com/repos/getlantern/lantern/statuses/e6e97b8cc0946530f75bd73738b11bc2377fe3c6"}}}}