{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/93965418","pull_request_review_id":14496360,"id":93965418,"diff_hunk":"@@ -206,9 +215,8 @@ public HttpPostRequestEncoder(\n             throw new NullPointerException(\"charset\");\n         }\n         HttpMethod method = request.method();\n-        if (!(method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT)\n-                || method.equals(HttpMethod.PATCH) || method.equals(HttpMethod.OPTIONS))) {\n-            throw new ErrorDataEncoderException(\"Cannot create a Encoder if not a POST\");\n+        if (method.equals(HttpMethod.TRACE)) {\n+            throw new ErrorDataEncoderException(\"Cannot create a Encoder if request is a TRACE\");","path":"codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java","position":51,"original_position":51,"commit_id":"c369c58fca62a358f1a7d6ce7e5f881d3f3ad805","original_commit_id":"c369c58fca62a358f1a7d6ce7e5f881d3f3ad805","user":{"login":"fredericBregier","id":477131,"avatar_url":"https://avatars.githubusercontent.com/u/477131?v=3","gravatar_id":"","url":"https://api.github.com/users/fredericBregier","html_url":"https://github.com/fredericBregier","followers_url":"https://api.github.com/users/fredericBregier/followers","following_url":"https://api.github.com/users/fredericBregier/following{/other_user}","gists_url":"https://api.github.com/users/fredericBregier/gists{/gist_id}","starred_url":"https://api.github.com/users/fredericBregier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredericBregier/subscriptions","organizations_url":"https://api.github.com/users/fredericBregier/orgs","repos_url":"https://api.github.com/users/fredericBregier/repos","events_url":"https://api.github.com/users/fredericBregier/events{/privacy}","received_events_url":"https://api.github.com/users/fredericBregier/received_events","type":"User","site_admin":false},"body":"Wdyt?","created_at":"2016-12-27T19:57:31Z","updated_at":"2016-12-27T19:57:31Z","html_url":"https://github.com/netty/netty/pull/6155#discussion_r93965418","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/6155","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/93965418"},"html":{"href":"https://github.com/netty/netty/pull/6155#discussion_r93965418"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/6155"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/6155","id":99139579,"html_url":"https://github.com/netty/netty/pull/6155","diff_url":"https://github.com/netty/netty/pull/6155.diff","patch_url":"https://github.com/netty/netty/pull/6155.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/6155","number":6155,"state":"open","locked":false,"title":"Extends HttpPostRequestEncoder to support all methods except TRACE","user":{"login":"fredericBregier","id":477131,"avatar_url":"https://avatars.githubusercontent.com/u/477131?v=3","gravatar_id":"","url":"https://api.github.com/users/fredericBregier","html_url":"https://github.com/fredericBregier","followers_url":"https://api.github.com/users/fredericBregier/followers","following_url":"https://api.github.com/users/fredericBregier/following{/other_user}","gists_url":"https://api.github.com/users/fredericBregier/gists{/gist_id}","starred_url":"https://api.github.com/users/fredericBregier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredericBregier/subscriptions","organizations_url":"https://api.github.com/users/fredericBregier/orgs","repos_url":"https://api.github.com/users/fredericBregier/repos","events_url":"https://api.github.com/users/fredericBregier/events{/privacy}","received_events_url":"https://api.github.com/users/fredericBregier/received_events","type":"User","site_admin":false},"body":"Motivation:\r\n\r\nIn Netty, currently, the HttpPostRequestEncoder only supports POST, PUT, PATCH and OPTIONS, while the RFC 7231 allows with a warning that GET, HEAD, DELETE and CONNECT use a body too (but not TRACE where it is explicitely not allowed).\r\nThe RFC in chapter 4.3 says:\r\n\"A payload within a XXX request message has no defined semantics;\r\nsending a payload body on a XXX request might cause some existing\r\nimplementations to reject the request.\"\r\nwhere XXX can be replaced by one of GET, HEAD, DELETE or CONNECT.\r\n\r\nCurrent usages, on particular in REST mode, tend to use those extra HttpMethods for such queries.\r\n\r\nSo this PR proposes to remove the current restrictions, leaving only TRACE as explicitely not supported.\r\n\r\nModification:\r\n\r\nIn the constructor, where the test is done, replacing all by checking only against TRACE, and adding one test to check that all methods are supported or not.\r\n\r\nResult:\r\n\r\nFixes #6138.\r\n","created_at":"2016-12-22T17:16:03Z","updated_at":"2016-12-27T19:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51c36a8d7972879268453a053aa08bd2d946a9c2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/netty/netty/pulls/6155/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/6155/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/6155/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/c369c58fca62a358f1a7d6ce7e5f881d3f3ad805","head":{"label":"fredericBregier:extending_httppostrequestencoder_methods","ref":"extending_httppostrequestencoder_methods","sha":"c369c58fca62a358f1a7d6ce7e5f881d3f3ad805","user":{"login":"fredericBregier","id":477131,"avatar_url":"https://avatars.githubusercontent.com/u/477131?v=3","gravatar_id":"","url":"https://api.github.com/users/fredericBregier","html_url":"https://github.com/fredericBregier","followers_url":"https://api.github.com/users/fredericBregier/followers","following_url":"https://api.github.com/users/fredericBregier/following{/other_user}","gists_url":"https://api.github.com/users/fredericBregier/gists{/gist_id}","starred_url":"https://api.github.com/users/fredericBregier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredericBregier/subscriptions","organizations_url":"https://api.github.com/users/fredericBregier/orgs","repos_url":"https://api.github.com/users/fredericBregier/repos","events_url":"https://api.github.com/users/fredericBregier/events{/privacy}","received_events_url":"https://api.github.com/users/fredericBregier/received_events","type":"User","site_admin":false},"repo":{"id":20618860,"name":"netty","full_name":"fredericBregier/netty","owner":{"login":"fredericBregier","id":477131,"avatar_url":"https://avatars.githubusercontent.com/u/477131?v=3","gravatar_id":"","url":"https://api.github.com/users/fredericBregier","html_url":"https://github.com/fredericBregier","followers_url":"https://api.github.com/users/fredericBregier/followers","following_url":"https://api.github.com/users/fredericBregier/following{/other_user}","gists_url":"https://api.github.com/users/fredericBregier/gists{/gist_id}","starred_url":"https://api.github.com/users/fredericBregier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredericBregier/subscriptions","organizations_url":"https://api.github.com/users/fredericBregier/orgs","repos_url":"https://api.github.com/users/fredericBregier/repos","events_url":"https://api.github.com/users/fredericBregier/events{/privacy}","received_events_url":"https://api.github.com/users/fredericBregier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fredericBregier/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/fredericBregier/netty","forks_url":"https://api.github.com/repos/fredericBregier/netty/forks","keys_url":"https://api.github.com/repos/fredericBregier/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fredericBregier/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fredericBregier/netty/teams","hooks_url":"https://api.github.com/repos/fredericBregier/netty/hooks","issue_events_url":"https://api.github.com/repos/fredericBregier/netty/issues/events{/number}","events_url":"https://api.github.com/repos/fredericBregier/netty/events","assignees_url":"https://api.github.com/repos/fredericBregier/netty/assignees{/user}","branches_url":"https://api.github.com/repos/fredericBregier/netty/branches{/branch}","tags_url":"https://api.github.com/repos/fredericBregier/netty/tags","blobs_url":"https://api.github.com/repos/fredericBregier/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fredericBregier/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fredericBregier/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/fredericBregier/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fredericBregier/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/fredericBregier/netty/languages","stargazers_url":"https://api.github.com/repos/fredericBregier/netty/stargazers","contributors_url":"https://api.github.com/repos/fredericBregier/netty/contributors","subscribers_url":"https://api.github.com/repos/fredericBregier/netty/subscribers","subscription_url":"https://api.github.com/repos/fredericBregier/netty/subscription","commits_url":"https://api.github.com/repos/fredericBregier/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/fredericBregier/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/fredericBregier/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/fredericBregier/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/fredericBregier/netty/contents/{+path}","compare_url":"https://api.github.com/repos/fredericBregier/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fredericBregier/netty/merges","archive_url":"https://api.github.com/repos/fredericBregier/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fredericBregier/netty/downloads","issues_url":"https://api.github.com/repos/fredericBregier/netty/issues{/number}","pulls_url":"https://api.github.com/repos/fredericBregier/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/fredericBregier/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/fredericBregier/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fredericBregier/netty/labels{/name}","releases_url":"https://api.github.com/repos/fredericBregier/netty/releases{/id}","deployments_url":"https://api.github.com/repos/fredericBregier/netty/deployments","created_at":"2014-06-08T14:54:54Z","updated_at":"2015-04-18T08:07:30Z","pushed_at":"2016-12-22T17:15:39Z","git_url":"git://github.com/fredericBregier/netty.git","ssh_url":"git@github.com:fredericBregier/netty.git","clone_url":"https://github.com/fredericBregier/netty.git","svn_url":"https://github.com/fredericBregier/netty","homepage":"http://netty.io/","size":40489,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"netty:4.1","ref":"4.1","sha":"0eeeb764391490585f690c8b424d9ce2d43e6a9b","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","deployments_url":"https://api.github.com/repos/netty/netty/deployments","created_at":"2010-11-09T09:22:21Z","updated_at":"2016-12-27T16:13:05Z","pushed_at":"2016-12-23T23:06:48Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":44116,"stargazers_count":8600,"watchers_count":8600,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4334,"mirror_url":null,"open_issues_count":335,"forks":4334,"open_issues":335,"watchers":8600,"default_branch":"4.1"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/6155"},"html":{"href":"https://github.com/netty/netty/pull/6155"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/6155"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/6155/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/6155/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/6155/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/c369c58fca62a358f1a7d6ce7e5f881d3f3ad805"}}}}
{"actor":{"display_login":"fredericBregier"}}