{"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/54295837","id":54295837,"diff_hunk":"@@ -579,15 +579,18 @@ trait BodyParsers {\n     // -- Magic any content\n \n     /**\n-     * If the request is a PATCH, POST, or PUT, parse the body content by checking the Content-Type header.\n+     * If the request is a PATCH, POST, PUT, or OPTIONS, parse the body content by checking the Content-Type header.\n      */\n     def default: BodyParser[AnyContent] = default(None)\n \n     /**\n-     * If the request is a PATCH, POST, or PUT, parse the body content by checking the Content-Type header.\n+     * If the request is a PATCH, POST, PUT, or OPTIONS, parse the body content by checking the Content-Type header.\n      */\n     def default(maxLength: Option[Long]): BodyParser[AnyContent] = using { request =>\n-      if (request.method == HttpVerbs.PATCH || request.method == HttpVerbs.POST || request.method == HttpVerbs.PUT) {","path":"framework/src/play/src/main/scala/play/api/mvc/ContentTypes.scala","position":14,"original_position":14,"commit_id":"e8e17e9e69264ba3a4767e4a9fab47d5c1aa19eb","original_commit_id":"e8e17e9e69264ba3a4767e4a9fab47d5c1aa19eb","user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"body":"Maybe we should just make a constant like `val MethodsWithBody = Set(PATCH, POST, PUT, OPTIONS)`","created_at":"2016-02-26T20:15:04Z","updated_at":"2016-02-26T20:15:04Z","html_url":"https://github.com/playframework/playframework/pull/5756#discussion_r54295837","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/5756","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/54295837"},"html":{"href":"https://github.com/playframework/playframework/pull/5756#discussion_r54295837"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5756"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/5756","id":60896806,"html_url":"https://github.com/playframework/playframework/pull/5756","diff_url":"https://github.com/playframework/playframework/pull/5756.diff","patch_url":"https://github.com/playframework/playframework/pull/5756.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/5756","number":5756,"state":"open","locked":false,"title":"[WIP] Adds OPTIONS as an HTTP verb that may contain a body by default.","user":{"login":"wsargent","id":71236,"avatar_url":"https://avatars.githubusercontent.com/u/71236?v=3","gravatar_id":"","url":"https://api.github.com/users/wsargent","html_url":"https://github.com/wsargent","followers_url":"https://api.github.com/users/wsargent/followers","following_url":"https://api.github.com/users/wsargent/following{/other_user}","gists_url":"https://api.github.com/users/wsargent/gists{/gist_id}","starred_url":"https://api.github.com/users/wsargent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsargent/subscriptions","organizations_url":"https://api.github.com/users/wsargent/orgs","repos_url":"https://api.github.com/users/wsargent/repos","events_url":"https://api.github.com/users/wsargent/events{/privacy}","received_events_url":"https://api.github.com/users/wsargent/received_events","type":"User","site_admin":false},"body":"Still a work in progress.\r\n\r\n## Fixes\r\n\r\nFixes https://github.com/playframework/playframework/issues/5503 -- note there is some confusion in the initial bug reporting, and https://github.com/playframework/playframework/issues/5503#issuecomment-175846025 is the real problem here.\r\n\r\n## Purpose\r\n\r\nAdds OPTIONS as an HTTP verb that may contain a body by default.\r\n\r\n## Background Context\r\n\r\nAdding a specific verb for OPTIONS is the lightest touch approach here.  BodyParsers.parse is a singleton object, and so it might be better to use an \"application.bodyParsers\" approach to help avoid global scope (especially if custom HTTP verbs are used).\r\n\r\n## References\r\n\r\nPer https://tools.ietf.org/html/rfc7231#section-4.3.7 a client may send OPTIONS with a payload body:\r\n\r\n```\r\n A client that generates an OPTIONS request containing a payload body\r\n   MUST send a valid Content-Type header field describing the\r\n   representation media type.  Although this specification does not\r\n   define any use for such a payload, future extensions to HTTP might\r\n   use the OPTIONS body to make more detailed queries about the target\r\n   resource.\r\n```","created_at":"2016-02-26T20:10:27Z","updated_at":"2016-02-26T20:15:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"799b92c98cd01396449b29b1856a890683764308","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/5756/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/5756/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/5756/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/e8e17e9e69264ba3a4767e4a9fab47d5c1aa19eb","head":{"label":"wsargent:add-options-as-containing-body","ref":"add-options-as-containing-body","sha":"e8e17e9e69264ba3a4767e4a9fab47d5c1aa19eb","user":{"login":"wsargent","id":71236,"avatar_url":"https://avatars.githubusercontent.com/u/71236?v=3","gravatar_id":"","url":"https://api.github.com/users/wsargent","html_url":"https://github.com/wsargent","followers_url":"https://api.github.com/users/wsargent/followers","following_url":"https://api.github.com/users/wsargent/following{/other_user}","gists_url":"https://api.github.com/users/wsargent/gists{/gist_id}","starred_url":"https://api.github.com/users/wsargent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsargent/subscriptions","organizations_url":"https://api.github.com/users/wsargent/orgs","repos_url":"https://api.github.com/users/wsargent/repos","events_url":"https://api.github.com/users/wsargent/events{/privacy}","received_events_url":"https://api.github.com/users/wsargent/received_events","type":"User","site_admin":false},"repo":{"id":11010009,"name":"playframework","full_name":"wsargent/playframework","owner":{"login":"wsargent","id":71236,"avatar_url":"https://avatars.githubusercontent.com/u/71236?v=3","gravatar_id":"","url":"https://api.github.com/users/wsargent","html_url":"https://github.com/wsargent","followers_url":"https://api.github.com/users/wsargent/followers","following_url":"https://api.github.com/users/wsargent/following{/other_user}","gists_url":"https://api.github.com/users/wsargent/gists{/gist_id}","starred_url":"https://api.github.com/users/wsargent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsargent/subscriptions","organizations_url":"https://api.github.com/users/wsargent/orgs","repos_url":"https://api.github.com/users/wsargent/repos","events_url":"https://api.github.com/users/wsargent/events{/privacy}","received_events_url":"https://api.github.com/users/wsargent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wsargent/playframework","description":"Play framework 2.x","fork":true,"url":"https://api.github.com/repos/wsargent/playframework","forks_url":"https://api.github.com/repos/wsargent/playframework/forks","keys_url":"https://api.github.com/repos/wsargent/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wsargent/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wsargent/playframework/teams","hooks_url":"https://api.github.com/repos/wsargent/playframework/hooks","issue_events_url":"https://api.github.com/repos/wsargent/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/wsargent/playframework/events","assignees_url":"https://api.github.com/repos/wsargent/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/wsargent/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/wsargent/playframework/tags","blobs_url":"https://api.github.com/repos/wsargent/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wsargent/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wsargent/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/wsargent/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wsargent/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/wsargent/playframework/languages","stargazers_url":"https://api.github.com/repos/wsargent/playframework/stargazers","contributors_url":"https://api.github.com/repos/wsargent/playframework/contributors","subscribers_url":"https://api.github.com/repos/wsargent/playframework/subscribers","subscription_url":"https://api.github.com/repos/wsargent/playframework/subscription","commits_url":"https://api.github.com/repos/wsargent/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/wsargent/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/wsargent/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/wsargent/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/wsargent/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/wsargent/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wsargent/playframework/merges","archive_url":"https://api.github.com/repos/wsargent/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wsargent/playframework/downloads","issues_url":"https://api.github.com/repos/wsargent/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/wsargent/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/wsargent/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/wsargent/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wsargent/playframework/labels{/name}","releases_url":"https://api.github.com/repos/wsargent/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/wsargent/playframework/deployments","created_at":"2013-06-27T22:58:23Z","updated_at":"2015-04-15T18:06:45Z","pushed_at":"2016-02-26T20:07:21Z","git_url":"git://github.com/wsargent/playframework.git","ssh_url":"git@github.com:wsargent/playframework.git","clone_url":"https://github.com/wsargent/playframework.git","svn_url":"https://github.com/wsargent/playframework","homepage":"http://www.playframework.org/","size":81949,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"playframework:master","ref":"master","sha":"07f4f8db8fd0d177208ef9cb38a56cb691fde04f","user":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2340549,"name":"playframework","full_name":"playframework/playframework","owner":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playframework/playframework","description":"Play Framework","fork":false,"url":"https://api.github.com/repos/playframework/playframework","forks_url":"https://api.github.com/repos/playframework/playframework/forks","keys_url":"https://api.github.com/repos/playframework/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playframework/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playframework/playframework/teams","hooks_url":"https://api.github.com/repos/playframework/playframework/hooks","issue_events_url":"https://api.github.com/repos/playframework/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/playframework/playframework/events","assignees_url":"https://api.github.com/repos/playframework/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/playframework/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/playframework/playframework/tags","blobs_url":"https://api.github.com/repos/playframework/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playframework/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playframework/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/playframework/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/playframework/playframework/languages","stargazers_url":"https://api.github.com/repos/playframework/playframework/stargazers","contributors_url":"https://api.github.com/repos/playframework/playframework/contributors","subscribers_url":"https://api.github.com/repos/playframework/playframework/subscribers","subscription_url":"https://api.github.com/repos/playframework/playframework/subscription","commits_url":"https://api.github.com/repos/playframework/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/playframework/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/playframework/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/playframework/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/playframework/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/playframework/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playframework/playframework/merges","archive_url":"https://api.github.com/repos/playframework/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playframework/playframework/downloads","issues_url":"https://api.github.com/repos/playframework/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/playframework/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/playframework/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/playframework/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playframework/playframework/labels{/name}","releases_url":"https://api.github.com/repos/playframework/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/playframework/playframework/deployments","created_at":"2011-09-07T09:24:08Z","updated_at":"2016-02-26T17:30:45Z","pushed_at":"2016-02-26T20:10:28Z","git_url":"git://github.com/playframework/playframework.git","ssh_url":"git@github.com:playframework/playframework.git","clone_url":"https://github.com/playframework/playframework.git","svn_url":"https://github.com/playframework/playframework","homepage":"http://www.playframework.com/","size":92594,"stargazers_count":7493,"watchers_count":7493,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2633,"mirror_url":null,"open_issues_count":281,"forks":2633,"open_issues":281,"watchers":7493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5756"},"html":{"href":"https://github.com/playframework/playframework/pull/5756"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/5756"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/5756/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5756/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5756/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/e8e17e9e69264ba3a4767e4a9fab47d5c1aa19eb"}}}}