GitHub PullRequestEvent at 2014-08-06 22:56:46
Repository: undertow
Actor: stuartwdouglas
Payload: {"action":"closed","number":231,"pull_request":{"url":"https://api.github.com/repos/undertow-io/undertow/pulls/231","id":19005445,"html_url":"https://github.com/undertow-io/undertow/pull/231","diff_url":"https://github.com/undertow-io/undertow/pull/231.diff","patch_url":"https://github.com/undertow-io/undertow/pull/231.patch","issue_url":"https://api.github.com/repos/undertow-io/undertow/issues/231","number":231,"state":"closed","title":"Added some convience methods to routing handler.  Handle an edge case fo...","user":{"login":"billoneil","id":5205330,"avatar_url":"https://avatars.githubusercontent.com/u/5205330?v=2","gravatar_id":"7dd78f5cc7587eb01aebe942152cc3a6","url":"https://api.github.com/users/billoneil","html_url":"https://github.com/billoneil","followers_url":"https://api.github.com/users/billoneil/followers","following_url":"https://api.github.com/users/billoneil/following{/other_user}","gists_url":"https://api.github.com/users/billoneil/gists{/gist_id}","starred_url":"https://api.github.com/users/billoneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billoneil/subscriptions","organizations_url":"https://api.github.com/users/billoneil/orgs","repos_url":"https://api.github.com/users/billoneil/repos","events_url":"https://api.github.com/users/billoneil/events{/privacy}","received_events_url":"https://api.github.com/users/billoneil/received_events","type":"User","site_admin":false},"body":"Tests initially failed from the following.\r\n\r\nGiven 3 routes\r\nGET           /foo\r\nDELETE    /foo\r\nGET          /bar\r\n\r\nA request to DELETE /bar will result in a 404 instead of a 405.  \r\n\r\n    PathTemplateMatcher<RoutingMatch> matcher = matches.get(exchange.getRequestMethod());\r\n    if (matcher == null) {\r\n        invalidMethodHandler.handleRequest(exchange);\r\n        return;\r\n    }\r\n    PathTemplateMatcher.PathMatchResult<RoutingMatch> match = matcher.match(exchange.getRelativePath());\r\n    if (match == null) {\r\n        fallbackHandler.handleRequest(exchange);\r\n        return;\r\n    } \r\n\r\nSince the routes are first mapped on the HttpMethod we will get a PathTemplateMatcher back which contains DELETE /foo.  It will then fall through to the next if and return a 404.  I think the expected behavior should be 405?  Is looping over ALL PathTemplateMatchers the only way to catch this?","created_at":"2014-07-29T02:29:36Z","updated_at":"2014-08-06T22:56:46Z","closed_at":"2014-08-06T22:56:46Z","merged_at":"2014-08-06T22:56:46Z","merge_commit_sha":"0c3fb368d8d58f5acb0233aa3bac121df30d3545","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/undertow-io/undertow/pulls/231/commits","review_comments_url":"https://api.github.com/repos/undertow-io/undertow/pulls/231/comments","review_comment_url":"https://api.github.com/repos/undertow-io/undertow/pulls/comments/{number}","comments_url":"https://api.github.com/repos/undertow-io/undertow/issues/231/comments","statuses_url":"https://api.github.com/repos/undertow-io/undertow/statuses/f0cef748edf8a25245ddb745832da2beac8d9ec3","head":{"label":"billoneil:feature/routing-handler-convience-methods","ref":"feature/routing-handler-convience-methods","sha":"f0cef748edf8a25245ddb745832da2beac8d9ec3","user":{"login":"billoneil","id":5205330,"avatar_url":"https://avatars.githubusercontent.com/u/5205330?v=2","gravatar_id":"7dd78f5cc7587eb01aebe942152cc3a6","url":"https://api.github.com/users/billoneil","html_url":"https://github.com/billoneil","followers_url":"https://api.github.com/users/billoneil/followers","following_url":"https://api.github.com/users/billoneil/following{/other_user}","gists_url":"https://api.github.com/users/billoneil/gists{/gist_id}","starred_url":"https://api.github.com/users/billoneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billoneil/subscriptions","organizations_url":"https://api.github.com/users/billoneil/orgs","repos_url":"https://api.github.com/users/billoneil/repos","events_url":"https://api.github.com/users/billoneil/events{/privacy}","received_events_url":"https://api.github.com/users/billoneil/received_events","type":"User","site_admin":false},"repo":{"id":21297732,"name":"undertow","full_name":"billoneil/undertow","owner":{"login":"billoneil","id":5205330,"avatar_url":"https://avatars.githubusercontent.com/u/5205330?v=2","gravatar_id":"7dd78f5cc7587eb01aebe942152cc3a6","url":"https://api.github.com/users/billoneil","html_url":"https://github.com/billoneil","followers_url":"https://api.github.com/users/billoneil/followers","following_url":"https://api.github.com/users/billoneil/following{/other_user}","gists_url":"https://api.github.com/users/billoneil/gists{/gist_id}","starred_url":"https://api.github.com/users/billoneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billoneil/subscriptions","organizations_url":"https://api.github.com/users/billoneil/orgs","repos_url":"https://api.github.com/users/billoneil/repos","events_url":"https://api.github.com/users/billoneil/events{/privacy}","received_events_url":"https://api.github.com/users/billoneil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/billoneil/undertow","description":"High performance non-blocking webserver","fork":true,"url":"https://api.github.com/repos/billoneil/undertow","forks_url":"https://api.github.com/repos/billoneil/undertow/forks","keys_url":"https://api.github.com/repos/billoneil/undertow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/billoneil/undertow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/billoneil/undertow/teams","hooks_url":"https://api.github.com/repos/billoneil/undertow/hooks","issue_events_url":"https://api.github.com/repos/billoneil/undertow/issues/events{/number}","events_url":"https://api.github.com/repos/billoneil/undertow/events","assignees_url":"https://api.github.com/repos/billoneil/undertow/assignees{/user}","branches_url":"https://api.github.com/repos/billoneil/undertow/branches{/branch}","tags_url":"https://api.github.com/repos/billoneil/undertow/tags","blobs_url":"https://api.github.com/repos/billoneil/undertow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/billoneil/undertow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/billoneil/undertow/git/refs{/sha}","trees_url":"https://api.github.com/repos/billoneil/undertow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/billoneil/undertow/statuses/{sha}","languages_url":"https://api.github.com/repos/billoneil/undertow/languages","stargazers_url":"https://api.github.com/repos/billoneil/undertow/stargazers","contributors_url":"https://api.github.com/repos/billoneil/undertow/contributors","subscribers_url":"https://api.github.com/repos/billoneil/undertow/subscribers","subscription_url":"https://api.github.com/repos/billoneil/undertow/subscription","commits_url":"https://api.github.com/repos/billoneil/undertow/commits{/sha}","git_commits_url":"https://api.github.com/repos/billoneil/undertow/git/commits{/sha}","comments_url":"https://api.github.com/repos/billoneil/undertow/comments{/number}","issue_comment_url":"https://api.github.com/repos/billoneil/undertow/issues/comments/{number}","contents_url":"https://api.github.com/repos/billoneil/undertow/contents/{+path}","compare_url":"https://api.github.com/repos/billoneil/undertow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/billoneil/undertow/merges","archive_url":"https://api.github.com/repos/billoneil/undertow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/billoneil/undertow/downloads","issues_url":"https://api.github.com/repos/billoneil/undertow/issues{/number}","pulls_url":"https://api.github.com/repos/billoneil/undertow/pulls{/number}","milestones_url":"https://api.github.com/repos/billoneil/undertow/milestones{/number}","notifications_url":"https://api.github.com/repos/billoneil/undertow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/billoneil/undertow/labels{/name}","releases_url":"https://api.github.com/repos/billoneil/undertow/releases{/id}","created_at":"2014-06-28T06:45:11Z","updated_at":"2014-06-27T07:51:24Z","pushed_at":"2014-07-31T21:27:07Z","git_url":"git://github.com/billoneil/undertow.git","ssh_url":"git@github.com:billoneil/undertow.git","clone_url":"https://github.com/billoneil/undertow.git","svn_url":"https://github.com/billoneil/undertow","homepage":"undertow.io","size":13133,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"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":"undertow-io:master","ref":"master","sha":"6ae68722491ccd85d4aab07c32a3296398bcffb7","user":{"login":"undertow-io","id":2001898,"avatar_url":"https://avatars.githubusercontent.com/u/2001898?v=2","gravatar_id":"ab94cc5c18e9b977b554494e61328964","url":"https://api.github.com/users/undertow-io","html_url":"https://github.com/undertow-io","followers_url":"https://api.github.com/users/undertow-io/followers","following_url":"https://api.github.com/users/undertow-io/following{/other_user}","gists_url":"https://api.github.com/users/undertow-io/gists{/gist_id}","starred_url":"https://api.github.com/users/undertow-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/undertow-io/subscriptions","organizations_url":"https://api.github.com/users/undertow-io/orgs","repos_url":"https://api.github.com/users/undertow-io/repos","events_url":"https://api.github.com/users/undertow-io/events{/privacy}","received_events_url":"https://api.github.com/users/undertow-io/received_events","type":"Organization","site_admin":false},"repo":{"id":5103785,"name":"undertow","full_name":"undertow-io/undertow","owner":{"login":"undertow-io","id":2001898,"avatar_url":"https://avatars.githubusercontent.com/u/2001898?v=2","gravatar_id":"ab94cc5c18e9b977b554494e61328964","url":"https://api.github.com/users/undertow-io","html_url":"https://github.com/undertow-io","followers_url":"https://api.github.com/users/undertow-io/followers","following_url":"https://api.github.com/users/undertow-io/following{/other_user}","gists_url":"https://api.github.com/users/undertow-io/gists{/gist_id}","starred_url":"https://api.github.com/users/undertow-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/undertow-io/subscriptions","organizations_url":"https://api.github.com/users/undertow-io/orgs","repos_url":"https://api.github.com/users/undertow-io/repos","events_url":"https://api.github.com/users/undertow-io/events{/privacy}","received_events_url":"https://api.github.com/users/undertow-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/undertow-io/undertow","description":"High performance non-blocking webserver","fork":false,"url":"https://api.github.com/repos/undertow-io/undertow","forks_url":"https://api.github.com/repos/undertow-io/undertow/forks","keys_url":"https://api.github.com/repos/undertow-io/undertow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/undertow-io/undertow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/undertow-io/undertow/teams","hooks_url":"https://api.github.com/repos/undertow-io/undertow/hooks","issue_events_url":"https://api.github.com/repos/undertow-io/undertow/issues/events{/number}","events_url":"https://api.github.com/repos/undertow-io/undertow/events","assignees_url":"https://api.github.com/repos/undertow-io/undertow/assignees{/user}","branches_url":"https://api.github.com/repos/undertow-io/undertow/branches{/branch}","tags_url":"https://api.github.com/repos/undertow-io/undertow/tags","blobs_url":"https://api.github.com/repos/undertow-io/undertow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/undertow-io/undertow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/undertow-io/undertow/git/refs{/sha}","trees_url":"https://api.github.com/repos/undertow-io/undertow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/undertow-io/undertow/statuses/{sha}","languages_url":"https://api.github.com/repos/undertow-io/undertow/languages","stargazers_url":"https://api.github.com/repos/undertow-io/undertow/stargazers","contributors_url":"https://api.github.com/repos/undertow-io/undertow/contributors","subscribers_url":"https://api.github.com/repos/undertow-io/undertow/subscribers","subscription_url":"https://api.github.com/repos/undertow-io/undertow/subscription","commits_url":"https://api.github.com/repos/undertow-io/undertow/commits{/sha}","git_commits_url":"https://api.github.com/repos/undertow-io/undertow/git/commits{/sha}","comments_url":"https://api.github.com/repos/undertow-io/undertow/comments{/number}","issue_comment_url":"https://api.github.com/repos/undertow-io/undertow/issues/comments/{number}","contents_url":"https://api.github.com/repos/undertow-io/undertow/contents/{+path}","compare_url":"https://api.github.com/repos/undertow-io/undertow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/undertow-io/undertow/merges","archive_url":"https://api.github.com/repos/undertow-io/undertow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/undertow-io/undertow/downloads","issues_url":"https://api.github.com/repos/undertow-io/undertow/issues{/number}","pulls_url":"https://api.github.com/repos/undertow-io/undertow/pulls{/number}","milestones_url":"https://api.github.com/repos/undertow-io/undertow/milestones{/number}","notifications_url":"https://api.github.com/repos/undertow-io/undertow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/undertow-io/undertow/labels{/name}","releases_url":"https://api.github.com/repos/undertow-io/undertow/releases{/id}","created_at":"2012-07-19T00:52:44Z","updated_at":"2014-08-06T21:38:15Z","pushed_at":"2014-08-06T22:56:46Z","git_url":"git://github.com/undertow-io/undertow.git","ssh_url":"git@github.com:undertow-io/undertow.git","clone_url":"https://github.com/undertow-io/undertow.git","svn_url":"https://github.com/undertow-io/undertow","homepage":"undertow.io","size":28185,"stargazers_count":416,"watchers_count":416,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":151,"mirror_url":null,"open_issues_count":2,"forks":151,"open_issues":2,"watchers":416,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/undertow-io/undertow/pulls/231"},"html":{"href":"https://github.com/undertow-io/undertow/pull/231"},"issue":{"href":"https://api.github.com/repos/undertow-io/undertow/issues/231"},"comments":{"href":"https://api.github.com/repos/undertow-io/undertow/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/undertow-io/undertow/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/undertow-io/undertow/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/undertow-io/undertow/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/undertow-io/undertow/statuses/f0cef748edf8a25245ddb745832da2beac8d9ec3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"stuartwdouglas","id":328571,"avatar_url":"https://avatars.githubusercontent.com/u/328571?v=2","gravatar_id":"c3cc797e76ad63e206555f5520f603a0","url":"https://api.github.com/users/stuartwdouglas","html_url":"https://github.com/stuartwdouglas","followers_url":"https://api.github.com/users/stuartwdouglas/followers","following_url":"https://api.github.com/users/stuartwdouglas/following{/other_user}","gists_url":"https://api.github.com/users/stuartwdouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartwdouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartwdouglas/subscriptions","organizations_url":"https://api.github.com/users/stuartwdouglas/orgs","repos_url":"https://api.github.com/users/stuartwdouglas/repos","events_url":"https://api.github.com/users/stuartwdouglas/events{/privacy}","received_events_url":"https://api.github.com/users/stuartwdouglas/received_events","type":"User","site_admin":false},"comments":2,"review_comments":4,"commits":2,"additions":114,"deletions":2,"changed_files":3}}