{"action":"created","comment":{"url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/comments/217215619","pull_request_review_id":154876012,"id":217215619,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzIxNTYxOQ==","diff_hunk":"@@ -0,0 +1,51 @@\n+package com.google.api.control;\n+\n+import static com.google.common.truth.Truth.assertThat;\n+import static org.mockito.Mockito.when;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.mockito.Mock;\n+import org.mockito.runners.MockitoJUnitRunner;\n+\n+import java.util.Vector;\n+import javax.servlet.http.HttpServletRequest;\n+\n+\n+@RunWith(MockitoJUnitRunner.class)\n+public class ConfigFilterTest {\n+  @Mock private HttpServletRequest request;\n+\n+  @Before\n+  public void setUp() {\n+  }\n+\n+  @Test\n+  public void getRequestMethodOverride() {\n+    Vector<String> headers = new Vector<>();\n+    headers.add(\"x-http-method-override\");\n+    when(request.getHeaderNames()).thenReturn(headers.elements());\n+    when(request.getHeader(\"x-http-method-override\")).thenReturn(\"post\");\n+    assertThat(ConfigFilter.getRequestMethodOverride(request)).isEqualTo(\"POST\");\n+  }\n+\n+  @Test\n+  public void getRequestMethodOverride_noHeader() {\n+    Vector<String> headers = new Vector<>();\n+    when(request.getHeaderNames()).thenReturn(headers.elements());\n+    assertThat(ConfigFilter.getRequestMethodOverride(request)).isNull();\n+  }\n+\n+  @Test\n+  public void getRealHttpMethod() {\n+    when(request.getAttribute(ConfigFilter.HTTP_METHOD_OVERRIDE_ATTRIBUTE)).thenReturn(\"foo\");","path":"endpoints-control/src/test/java/com/google/api/control/ConfigFilterTest.java","position":42,"original_position":42,"commit_id":"3439ab697444f62f777d0bf3bd199202fd2e5101","original_commit_id":"3439ab697444f62f777d0bf3bd199202fd2e5101","user":{"login":"tangiel","id":22239483,"node_id":"MDQ6VXNlcjIyMjM5NDgz","avatar_url":"https://avatars3.githubusercontent.com/u/22239483?v=4","gravatar_id":"","url":"https://api.github.com/users/tangiel","html_url":"https://github.com/tangiel","followers_url":"https://api.github.com/users/tangiel/followers","following_url":"https://api.github.com/users/tangiel/following{/other_user}","gists_url":"https://api.github.com/users/tangiel/gists{/gist_id}","starred_url":"https://api.github.com/users/tangiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangiel/subscriptions","organizations_url":"https://api.github.com/users/tangiel/orgs","repos_url":"https://api.github.com/users/tangiel/repos","events_url":"https://api.github.com/users/tangiel/events{/privacy}","received_events_url":"https://api.github.com/users/tangiel/received_events","type":"User","site_admin":false},"body":"It does not really matter. The caps should be (and is) tested in getRequestMethodOverride, which does the actual capitalization.","created_at":"2018-09-12T23:00:20Z","updated_at":"2018-09-12T23:00:21Z","html_url":"https://github.com/cloudendpoints/endpoints-management-java/pull/44#discussion_r217215619","pull_request_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/comments/217215619"},"html":{"href":"https://github.com/cloudendpoints/endpoints-management-java/pull/44#discussion_r217215619"},"pull_request":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44"}},"in_reply_to_id":217213108},"pull_request":{"url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44","id":215087413,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MDg3NDEz","html_url":"https://github.com/cloudendpoints/endpoints-management-java/pull/44","diff_url":"https://github.com/cloudendpoints/endpoints-management-java/pull/44.diff","patch_url":"https://github.com/cloudendpoints/endpoints-management-java/pull/44.patch","issue_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/44","number":44,"state":"open","locked":false,"title":"accept x-http-method-override for http method","user":{"login":"tangiel","id":22239483,"node_id":"MDQ6VXNlcjIyMjM5NDgz","avatar_url":"https://avatars3.githubusercontent.com/u/22239483?v=4","gravatar_id":"","url":"https://api.github.com/users/tangiel","html_url":"https://github.com/tangiel","followers_url":"https://api.github.com/users/tangiel/followers","following_url":"https://api.github.com/users/tangiel/following{/other_user}","gists_url":"https://api.github.com/users/tangiel/gists{/gist_id}","starred_url":"https://api.github.com/users/tangiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangiel/subscriptions","organizations_url":"https://api.github.com/users/tangiel/orgs","repos_url":"https://api.github.com/users/tangiel/repos","events_url":"https://api.github.com/users/tangiel/events{/privacy}","received_events_url":"https://api.github.com/users/tangiel/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-12T20:33:26Z","updated_at":"2018-09-12T23:00:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d25c70321092ce9488e69966a4b9bc09970e420","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44/commits","review_comments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44/comments","review_comment_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/44/comments","statuses_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/statuses/3439ab697444f62f777d0bf3bd199202fd2e5101","head":{"label":"cloudendpoints:real-http-method","ref":"real-http-method","sha":"3439ab697444f62f777d0bf3bd199202fd2e5101","user":{"login":"cloudendpoints","id":19231370,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMxMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/19231370?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudendpoints","html_url":"https://github.com/cloudendpoints","followers_url":"https://api.github.com/users/cloudendpoints/followers","following_url":"https://api.github.com/users/cloudendpoints/following{/other_user}","gists_url":"https://api.github.com/users/cloudendpoints/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudendpoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudendpoints/subscriptions","organizations_url":"https://api.github.com/users/cloudendpoints/orgs","repos_url":"https://api.github.com/users/cloudendpoints/repos","events_url":"https://api.github.com/users/cloudendpoints/events{/privacy}","received_events_url":"https://api.github.com/users/cloudendpoints/received_events","type":"Organization","site_admin":false},"repo":{"id":65349761,"node_id":"MDEwOlJlcG9zaXRvcnk2NTM0OTc2MQ==","name":"endpoints-management-java","full_name":"cloudendpoints/endpoints-management-java","owner":{"login":"cloudendpoints","id":19231370,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMxMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/19231370?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudendpoints","html_url":"https://github.com/cloudendpoints","followers_url":"https://api.github.com/users/cloudendpoints/followers","following_url":"https://api.github.com/users/cloudendpoints/following{/other_user}","gists_url":"https://api.github.com/users/cloudendpoints/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudendpoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudendpoints/subscriptions","organizations_url":"https://api.github.com/users/cloudendpoints/orgs","repos_url":"https://api.github.com/users/cloudendpoints/repos","events_url":"https://api.github.com/users/cloudendpoints/events{/privacy}","received_events_url":"https://api.github.com/users/cloudendpoints/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudendpoints/endpoints-management-java","description":"A Java library for managing API services using Google's Service Control APIs","fork":false,"url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java","forks_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/forks","keys_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/teams","hooks_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/hooks","issue_events_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/events{/number}","events_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/events","assignees_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/assignees{/user}","branches_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/branches{/branch}","tags_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/tags","blobs_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/languages","stargazers_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/stargazers","contributors_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/contributors","subscribers_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/subscribers","subscription_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/subscription","commits_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/contents/{+path}","compare_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/merges","archive_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/downloads","issues_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues{/number}","pulls_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/labels{/name}","releases_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/releases{/id}","deployments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/deployments","created_at":"2016-08-10T04:10:31Z","updated_at":"2018-09-11T23:56:26Z","pushed_at":"2018-09-12T22:26:32Z","git_url":"git://github.com/cloudendpoints/endpoints-management-java.git","ssh_url":"git@github.com:cloudendpoints/endpoints-management-java.git","clone_url":"https://github.com/cloudendpoints/endpoints-management-java.git","svn_url":"https://github.com/cloudendpoints/endpoints-management-java","homepage":"","size":591,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"cloudendpoints:master","ref":"master","sha":"eda2f4f600eb27d97792413de49aeaf0444bd9b9","user":{"login":"cloudendpoints","id":19231370,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMxMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/19231370?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudendpoints","html_url":"https://github.com/cloudendpoints","followers_url":"https://api.github.com/users/cloudendpoints/followers","following_url":"https://api.github.com/users/cloudendpoints/following{/other_user}","gists_url":"https://api.github.com/users/cloudendpoints/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudendpoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudendpoints/subscriptions","organizations_url":"https://api.github.com/users/cloudendpoints/orgs","repos_url":"https://api.github.com/users/cloudendpoints/repos","events_url":"https://api.github.com/users/cloudendpoints/events{/privacy}","received_events_url":"https://api.github.com/users/cloudendpoints/received_events","type":"Organization","site_admin":false},"repo":{"id":65349761,"node_id":"MDEwOlJlcG9zaXRvcnk2NTM0OTc2MQ==","name":"endpoints-management-java","full_name":"cloudendpoints/endpoints-management-java","owner":{"login":"cloudendpoints","id":19231370,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMxMzcw","avatar_url":"https://avatars1.githubusercontent.com/u/19231370?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudendpoints","html_url":"https://github.com/cloudendpoints","followers_url":"https://api.github.com/users/cloudendpoints/followers","following_url":"https://api.github.com/users/cloudendpoints/following{/other_user}","gists_url":"https://api.github.com/users/cloudendpoints/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudendpoints/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudendpoints/subscriptions","organizations_url":"https://api.github.com/users/cloudendpoints/orgs","repos_url":"https://api.github.com/users/cloudendpoints/repos","events_url":"https://api.github.com/users/cloudendpoints/events{/privacy}","received_events_url":"https://api.github.com/users/cloudendpoints/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudendpoints/endpoints-management-java","description":"A Java library for managing API services using Google's Service Control APIs","fork":false,"url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java","forks_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/forks","keys_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/teams","hooks_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/hooks","issue_events_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/events{/number}","events_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/events","assignees_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/assignees{/user}","branches_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/branches{/branch}","tags_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/tags","blobs_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/languages","stargazers_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/stargazers","contributors_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/contributors","subscribers_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/subscribers","subscription_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/subscription","commits_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/contents/{+path}","compare_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/merges","archive_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/downloads","issues_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues{/number}","pulls_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/labels{/name}","releases_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/releases{/id}","deployments_url":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/deployments","created_at":"2016-08-10T04:10:31Z","updated_at":"2018-09-11T23:56:26Z","pushed_at":"2018-09-12T22:26:32Z","git_url":"git://github.com/cloudendpoints/endpoints-management-java.git","ssh_url":"git@github.com:cloudendpoints/endpoints-management-java.git","clone_url":"https://github.com/cloudendpoints/endpoints-management-java.git","svn_url":"https://github.com/cloudendpoints/endpoints-management-java","homepage":"","size":591,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44"},"html":{"href":"https://github.com/cloudendpoints/endpoints-management-java/pull/44"},"issue":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/44"},"comments":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/cloudendpoints/endpoints-management-java/statuses/3439ab697444f62f777d0bf3bd199202fd2e5101"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tangiel"}}