{"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/77906836","id":77906836,"diff_hunk":"@@ -6,32 +6,33 @@ package play.core.server.netty\n import java.net.{ InetSocketAddress, URI }\n import java.security.cert.X509Certificate\n import java.time.Instant\n-import javax.net.ssl.SSLEngine\n-import javax.net.ssl.SSLPeerUnverifiedException\n+import javax.net.ssl.{ SSLEngine, SSLPeerUnverifiedException }\n \n import akka.stream.Materializer\n import akka.stream.scaladsl.{ Sink, Source }\n import akka.util.ByteString\n+import com.netaporter.uri.Uri\n import com.typesafe.netty.http.{ DefaultStreamedHttpResponse, StreamedHttpRequest }\n import io.netty.buffer.{ ByteBuf, Unpooled }\n import io.netty.handler.codec.http._\n import io.netty.handler.ssl.SslHandler\n import io.netty.util.ReferenceCountUtil\n import play.api.Logger\n-import play.api.http._\n import play.api.http.HeaderNames._\n-import play.api.libs.typedmap.TypedMap\n+import play.api.http._\n+import play.api.libs.typedmap.{ TypedKey, TypedMap }\n import play.api.mvc._\n import play.core.server.common.{ ConnectionInfo, ForwardedHeaderHandler, ServerResultUtils }\n \n-import scala.collection.JavaConverters._\n import scala.concurrent.Future\n import scala.util.{ Failure, Try }\n \n private[server] class NettyModelConversion(forwardedHeaderHandler: ForwardedHeaderHandler) {\n \n   private val logger = Logger(classOf[NettyModelConversion])\n \n+  private val typedUriKey = TypedKey[Uri](\"scala-uri\")","path":"framework/src/play-netty-server/src/main/scala/play/core/server/netty/NettyModelConversion.scala","position":34,"original_position":34,"commit_id":"d633f5a8145bfe72f646fb42e3987f35c7b652e0","original_commit_id":"7018fbdbeac5c38edbf765d794431aced84ac42a","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":"If we are going to access this later from some other place we need to make this static. Also `TypedKey`s are compared by reference.","created_at":"2016-09-07T21:24:48Z","updated_at":"2016-09-07T21:24:48Z","html_url":"https://github.com/playframework/playframework/pull/6524#discussion_r77906836","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/6524","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/77906836"},"html":{"href":"https://github.com/playframework/playframework/pull/6524#discussion_r77906836"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6524"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/6524","id":84003399,"html_url":"https://github.com/playframework/playframework/pull/6524","diff_url":"https://github.com/playframework/playframework/pull/6524.diff","patch_url":"https://github.com/playframework/playframework/pull/6524.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/6524","number":6524,"state":"open","locked":false,"title":"WIP: uri decoding / encoding","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":"TODO:\r\n\r\n- [ ] WSClient Uri encoding\r\n- [ ] Cleanup\r\n- [ ] Tests\r\n\r\nActually scala-uri is only suitable for uri encoding/decoding, however `java.net.URI` is already good to parse the URL.\r\n\r\nThis comes with breaking changes:\r\n- Path is now decoded. So Users which are checking the request.path will now see a different result i.e. `/foo%20bar.txt` will be `/foo bar.txt` we could convert that back, but I guess decode the path correctly is way more sane.\r\n- Query Strings are working correctly now especially edge cases: https://github.com/playframework/playframework/issues/6509\r\n\r\nWill Fix:\r\n- https://github.com/playframework/playframework/issues/6509\r\n- https://github.com/playframework/playframework/issues/6507\r\n- https://github.com/playframework/playframework/issues/6450\r\n\r\nMaybe / Could be out of scope:\r\n- https://github.com/playframework/playframework/issues/3247\r\n","created_at":"2016-09-05T13:36:26Z","updated_at":"2016-09-07T21:24:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2755735a602b45d91ff1ab295617c30e417f7ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/6524/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/6524/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/6524/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/d633f5a8145bfe72f646fb42e3987f35c7b652e0","head":{"label":"schmitch:uri-encoding-decoing","ref":"uri-encoding-decoing","sha":"d633f5a8145bfe72f646fb42e3987f35c7b652e0","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-07T14:29:15Z","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":83505,"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:master","ref":"master","sha":"cbc920db9b90fe5edcb1936579c69a4b135c23e6","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-07T10:53:29Z","pushed_at":"2016-09-07T21:18:44Z","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":8350,"watchers_count":8350,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2883,"mirror_url":null,"open_issues_count":283,"forks":2883,"open_issues":283,"watchers":8350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6524"},"html":{"href":"https://github.com/playframework/playframework/pull/6524"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/6524"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/6524/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6524/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/6524/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/d633f5a8145bfe72f646fb42e3987f35c7b652e0"}}}}
{"actor":{"display_login":"gmethvin"}}