{"action":"created","comment":{"url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/comments/82619853","pull_request_review_id":3514467,"id":82619853,"diff_hunk":"@@ -232,6 +233,18 @@ synchronized boolean matches(RoutingContext context, String mountPoint, boolean\n     }\n     HttpServerRequest request = context.request();\n     if (!methods.isEmpty() && !methods.contains(request.method())) {\n+      context.response().putHeader(HttpHeaders.ALLOW, String.join(\", \", () -> new Iterator<CharSequence>() {\n+        final Iterator<HttpMethod> it = methods.iterator();\n+        @Override\n+        public boolean hasNext() {\n+          return it.hasNext();\n+        }\n+\n+        @Override\n+        public CharSequence next() {\n+          return it.next().name();\n+        }\n+      }));","path":"vertx-web/src/main/java/io/vertx/ext/web/impl/RouteImpl.java","position":23,"original_position":23,"commit_id":"416d67382d777035069504f0f760f572b87947ed","original_commit_id":"416d67382d777035069504f0f760f572b87947ed","user":{"login":"brunoais","id":639467,"avatar_url":"https://avatars.githubusercontent.com/u/639467?v=3","gravatar_id":"","url":"https://api.github.com/users/brunoais","html_url":"https://github.com/brunoais","followers_url":"https://api.github.com/users/brunoais/followers","following_url":"https://api.github.com/users/brunoais/following{/other_user}","gists_url":"https://api.github.com/users/brunoais/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoais/subscriptions","organizations_url":"https://api.github.com/users/brunoais/orgs","repos_url":"https://api.github.com/users/brunoais/repos","events_url":"https://api.github.com/users/brunoais/events{/privacy}","received_events_url":"https://api.github.com/users/brunoais/received_events","type":"User","site_admin":false},"body":"This is a large chunk of code that is out of context in this method.\r\nSuggestion: Make a static class inside inside `RouteImpl` that receives the methods Set and returns a function. That function creates and returns the iterator.\r\nCreate a new field + methods on `RoutingContext` (or related) to hold the default error warning","created_at":"2016-10-10T14:53:01Z","updated_at":"2016-10-10T14:53:01Z","html_url":"https://github.com/vert-x3/vertx-web/pull/458#discussion_r82619853","pull_request_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458","_links":{"self":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/comments/82619853"},"html":{"href":"https://github.com/vert-x3/vertx-web/pull/458#discussion_r82619853"},"pull_request":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458"}}},"pull_request":{"url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458","id":87469038,"html_url":"https://github.com/vert-x3/vertx-web/pull/458","diff_url":"https://github.com/vert-x3/vertx-web/pull/458.diff","patch_url":"https://github.com/vert-x3/vertx-web/pull/458.patch","issue_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/458","number":458,"state":"open","locked":false,"title":"return correct status code for consumes/produces/method","user":{"login":"pmlopes","id":849467,"avatar_url":"https://avatars.githubusercontent.com/u/849467?v=3","gravatar_id":"","url":"https://api.github.com/users/pmlopes","html_url":"https://github.com/pmlopes","followers_url":"https://api.github.com/users/pmlopes/followers","following_url":"https://api.github.com/users/pmlopes/following{/other_user}","gists_url":"https://api.github.com/users/pmlopes/gists{/gist_id}","starred_url":"https://api.github.com/users/pmlopes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmlopes/subscriptions","organizations_url":"https://api.github.com/users/pmlopes/orgs","repos_url":"https://api.github.com/users/pmlopes/repos","events_url":"https://api.github.com/users/pmlopes/events{/privacy}","received_events_url":"https://api.github.com/users/pmlopes/received_events","type":"User","site_admin":false},"body":"Fixes #456 \r\n\r\n* on mismatch of method returns 405\r\n* on mismatch of accepts returns 406\r\n* on mismatch of content-type returns 415\r\n\r\ncustoms error codes are reset if another handler is still in the chain after the check.","created_at":"2016-09-30T10:21:27Z","updated_at":"2016-10-10T15:00:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e446d232c48d8d96653eae5a2804e0c76cbf8cbf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458/commits","review_comments_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458/comments","review_comment_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/458/comments","statuses_url":"https://api.github.com/repos/vert-x3/vertx-web/statuses/416d67382d777035069504f0f760f572b87947ed","head":{"label":"vert-x3:issues/issue-456","ref":"issues/issue-456","sha":"416d67382d777035069504f0f760f572b87947ed","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":26628954,"name":"vertx-web","full_name":"vert-x3/vertx-web","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-web","description":"HTTP web applications for Vert.x","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-web","forks_url":"https://api.github.com/repos/vert-x3/vertx-web/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-web/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-web/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-web/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-web/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-web/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-web/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-web/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-web/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-web/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-web/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-web/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-web/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-web/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-web/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-web/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-web/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-web/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-web/releases{/id}","deployments_url":"https://api.github.com/repos/vert-x3/vertx-web/deployments","created_at":"2014-11-14T08:15:20Z","updated_at":"2016-10-09T06:58:42Z","pushed_at":"2016-10-10T10:57:51Z","git_url":"git://github.com/vert-x3/vertx-web.git","ssh_url":"git@github.com:vert-x3/vertx-web.git","clone_url":"https://github.com/vert-x3/vertx-web.git","svn_url":"https://github.com/vert-x3/vertx-web","homepage":"","size":9726,"stargazers_count":218,"watchers_count":218,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":50,"forks":129,"open_issues":50,"watchers":218,"default_branch":"master"}},"base":{"label":"vert-x3:master","ref":"master","sha":"09a2463262b46b1826c088624f549b3cbb6f4f01","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":26628954,"name":"vertx-web","full_name":"vert-x3/vertx-web","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-web","description":"HTTP web applications for Vert.x","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-web","forks_url":"https://api.github.com/repos/vert-x3/vertx-web/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-web/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-web/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-web/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-web/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-web/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-web/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-web/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-web/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-web/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-web/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-web/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-web/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-web/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-web/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-web/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-web/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-web/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-web/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-web/releases{/id}","deployments_url":"https://api.github.com/repos/vert-x3/vertx-web/deployments","created_at":"2014-11-14T08:15:20Z","updated_at":"2016-10-09T06:58:42Z","pushed_at":"2016-10-10T10:57:51Z","git_url":"git://github.com/vert-x3/vertx-web.git","ssh_url":"git@github.com:vert-x3/vertx-web.git","clone_url":"https://github.com/vert-x3/vertx-web.git","svn_url":"https://github.com/vert-x3/vertx-web","homepage":"","size":9726,"stargazers_count":218,"watchers_count":218,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":50,"forks":129,"open_issues":50,"watchers":218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458"},"html":{"href":"https://github.com/vert-x3/vertx-web/pull/458"},"issue":{"href":"https://api.github.com/repos/vert-x3/vertx-web/issues/458"},"comments":{"href":"https://api.github.com/repos/vert-x3/vertx-web/issues/458/comments"},"review_comments":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458/comments"},"review_comment":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vert-x3/vertx-web/pulls/458/commits"},"statuses":{"href":"https://api.github.com/repos/vert-x3/vertx-web/statuses/416d67382d777035069504f0f760f572b87947ed"}}}}
{"actor":{"display_login":"brunoais"}}