{"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/77711180","id":77711180,"diff_hunk":"@@ -30,6 +29,30 @@ private[server] class NettyModelConversion(forwardedHeaderHandler: ForwardedHead\n \n   private val logger = Logger(classOf[NettyModelConversion])\n \n+  def pathError(uri: String): String = {\n+    // The URI may be invalid, so instead, do a crude heuristic to drop the host and query string from it to get the\n+    // path, and don't decode.\n+    val withoutHost = uri.dropWhile(_ != '/')\n+    val withoutQueryString = withoutHost.split('?').head\n+    if (withoutQueryString.isEmpty) \"/\" else withoutQueryString\n+  }\n+\n+  def parseUri(rawUri: String): (String, Map[String, Seq[String]]) = {\n+    // wrapping into URI to handle absoluteURI and Failures\n+    val javaUri = new URI(rawUri)\n+    val path = Option(javaUri.getRawPath).getOrElse {\n+      // if the URI has no path, this will trigger a 400 error\n+      throw new IllegalStateException(s\"Cannot parse path from URI: ${pathError(rawUri)}\")\n+    }\n+    val decoder = new QueryStringDecoder(javaUri)\n+    val parameters: Map[String, Seq[String]] = {\n+      val decodedParameters = decoder.parameters()\n+      if (decodedParameters.isEmpty) Map.empty\n+      else decodedParameters.asScala.mapValues(_.asScala.mkString.split(\",\").toList).toMap","path":"framework/src/play-netty-server/src/main/scala/play/core/server/netty/NettyModelConversion.scala","position":49,"original_position":49,"commit_id":"4d0240c85f2fa1fb268b11c3879431070711d97e","original_commit_id":"4d0240c85f2fa1fb268b11c3879431070711d97e","user":{"login":"schmitch","id":1641401,"avatar_url":"https://avatars.githubusercontent.com/u/1641401?v=3","gravatar_id":"","url":"https://api.github.com/users/schmitch","html_url":"https://github.com/schmitch","followers_url":"https://api.github.com/users/schmitch/followers","following_url":"https://api.github.com/users/schmitch/following{/other_user}","gists_url":"https://api.github.com/users/schmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/schmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmitch/subscriptions","organizations_url":"https://api.github.com/users/schmitch/orgs","repos_url":"https://api.github.com/users/schmitch/repos","events_url":"https://api.github.com/users/schmitch/events{/privacy}","received_events_url":"https://api.github.com/users/schmitch/received_events","type":"User","site_admin":false},"body":"without mkString/split it first it would fail on \"a=b,c\".","created_at":"2016-09-06T20:23:29Z","updated_at":"2016-09-06T20:23:29Z","html_url":"https://github.com/playframework/playframework/pull/6529#discussion_r77711180","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/6529","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/77711180"},"html":{"href":"https://github.com/playframework/playframework/pull/6529#discussion_r77711180"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6529"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/6529","id":84079284,"html_url":"https://github.com/playframework/playframework/pull/6529","diff_url":"https://github.com/playframework/playframework/pull/6529.diff","patch_url":"https://github.com/playframework/playframework/pull/6529.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/6529","number":6529,"state":"open","locked":false,"title":"[2.5.x] fixes the uri encoding/decoding with netty 4.0.40.Final","user":{"login":"schmitch","id":1641401,"avatar_url":"https://avatars.githubusercontent.com/u/1641401?v=3","gravatar_id":"","url":"https://api.github.com/users/schmitch","html_url":"https://github.com/schmitch","followers_url":"https://api.github.com/users/schmitch/followers","following_url":"https://api.github.com/users/schmitch/following{/other_user}","gists_url":"https://api.github.com/users/schmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/schmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmitch/subscriptions","organizations_url":"https://api.github.com/users/schmitch/orgs","repos_url":"https://api.github.com/users/schmitch/repos","events_url":"https://api.github.com/users/schmitch/events{/privacy}","received_events_url":"https://api.github.com/users/schmitch/received_events","type":"User","site_admin":false},"body":"This will actually fix the error that will come up with netty 4.0.40.Final.\r\nWe don't need to Backport the Netty Decoder since `java.net.URI` is already correct.\r\n\r\nOnly fails: https://travis-ci.org/playframework/playframework/jobs/157826296#L3011\r\nNettyWebSocketSpec.\r\n\r\n","created_at":"2016-09-06T08:21:51Z","updated_at":"2016-09-06T20:23:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37310baf2385bf7f06b4105e9dc8c693f1f69e02","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/6529/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/6529/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/6529/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/4d0240c85f2fa1fb268b11c3879431070711d97e","head":{"label":"schmitch:uri-decoding-25","ref":"uri-decoding-25","sha":"4d0240c85f2fa1fb268b11c3879431070711d97e","user":{"login":"schmitch","id":1641401,"avatar_url":"https://avatars.githubusercontent.com/u/1641401?v=3","gravatar_id":"","url":"https://api.github.com/users/schmitch","html_url":"https://github.com/schmitch","followers_url":"https://api.github.com/users/schmitch/followers","following_url":"https://api.github.com/users/schmitch/following{/other_user}","gists_url":"https://api.github.com/users/schmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/schmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmitch/subscriptions","organizations_url":"https://api.github.com/users/schmitch/orgs","repos_url":"https://api.github.com/users/schmitch/repos","events_url":"https://api.github.com/users/schmitch/events{/privacy}","received_events_url":"https://api.github.com/users/schmitch/received_events","type":"User","site_admin":false},"repo":{"id":46038091,"name":"playframework","full_name":"schmitch/playframework","owner":{"login":"schmitch","id":1641401,"avatar_url":"https://avatars.githubusercontent.com/u/1641401?v=3","gravatar_id":"","url":"https://api.github.com/users/schmitch","html_url":"https://github.com/schmitch","followers_url":"https://api.github.com/users/schmitch/followers","following_url":"https://api.github.com/users/schmitch/following{/other_user}","gists_url":"https://api.github.com/users/schmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/schmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmitch/subscriptions","organizations_url":"https://api.github.com/users/schmitch/orgs","repos_url":"https://api.github.com/users/schmitch/repos","events_url":"https://api.github.com/users/schmitch/events{/privacy}","received_events_url":"https://api.github.com/users/schmitch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schmitch/playframework","description":"Play Framework","fork":true,"url":"https://api.github.com/repos/schmitch/playframework","forks_url":"https://api.github.com/repos/schmitch/playframework/forks","keys_url":"https://api.github.com/repos/schmitch/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schmitch/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schmitch/playframework/teams","hooks_url":"https://api.github.com/repos/schmitch/playframework/hooks","issue_events_url":"https://api.github.com/repos/schmitch/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/schmitch/playframework/events","assignees_url":"https://api.github.com/repos/schmitch/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/schmitch/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/schmitch/playframework/tags","blobs_url":"https://api.github.com/repos/schmitch/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schmitch/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schmitch/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/schmitch/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schmitch/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/schmitch/playframework/languages","stargazers_url":"https://api.github.com/repos/schmitch/playframework/stargazers","contributors_url":"https://api.github.com/repos/schmitch/playframework/contributors","subscribers_url":"https://api.github.com/repos/schmitch/playframework/subscribers","subscription_url":"https://api.github.com/repos/schmitch/playframework/subscription","commits_url":"https://api.github.com/repos/schmitch/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/schmitch/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/schmitch/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/schmitch/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/schmitch/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/schmitch/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schmitch/playframework/merges","archive_url":"https://api.github.com/repos/schmitch/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schmitch/playframework/downloads","issues_url":"https://api.github.com/repos/schmitch/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/schmitch/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/schmitch/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/schmitch/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schmitch/playframework/labels{/name}","releases_url":"https://api.github.com/repos/schmitch/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/schmitch/playframework/deployments","created_at":"2015-11-12T07:57:24Z","updated_at":"2016-02-26T10:15:18Z","pushed_at":"2016-09-06T08:52:07Z","git_url":"git://github.com/schmitch/playframework.git","ssh_url":"git@github.com:schmitch/playframework.git","clone_url":"https://github.com/schmitch/playframework.git","svn_url":"https://github.com/schmitch/playframework","homepage":"http://www.playframework.com/","size":83501,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"playframework:2.5.x","ref":"2.5.x","sha":"8f08ccfbf18214ff96f5d1c33d7009adaadb029e","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-09-06T18:25:22Z","pushed_at":"2016-09-06T20:18:48Z","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":95545,"stargazers_count":8347,"watchers_count":8347,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2882,"mirror_url":null,"open_issues_count":283,"forks":2882,"open_issues":283,"watchers":8347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6529"},"html":{"href":"https://github.com/playframework/playframework/pull/6529"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/6529"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/6529/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6529/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6529/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/4d0240c85f2fa1fb268b11c3879431070711d97e"}}}}
{"actor":{"display_login":"schmitch"}}