{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc-java/issues/1129","labels_url":"https://api.github.com/repos/grpc/grpc-java/issues/1129/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc-java/issues/1129/comments","events_url":"https://api.github.com/repos/grpc/grpc-java/issues/1129/events","html_url":"https://github.com/grpc/grpc-java/pull/1129","id":112694304,"number":1129,"title":"Netty authority override","user":{"login":"carl-mastrangelo","id":8943572,"avatar_url":"https://avatars.githubusercontent.com/u/8943572?v=3","gravatar_id":"","url":"https://api.github.com/users/carl-mastrangelo","html_url":"https://github.com/carl-mastrangelo","followers_url":"https://api.github.com/users/carl-mastrangelo/followers","following_url":"https://api.github.com/users/carl-mastrangelo/following{/other_user}","gists_url":"https://api.github.com/users/carl-mastrangelo/gists{/gist_id}","starred_url":"https://api.github.com/users/carl-mastrangelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carl-mastrangelo/subscriptions","organizations_url":"https://api.github.com/users/carl-mastrangelo/orgs","repos_url":"https://api.github.com/users/carl-mastrangelo/repos","events_url":"https://api.github.com/users/carl-mastrangelo/events{/privacy}","received_events_url":"https://api.github.com/users/carl-mastrangelo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-21T22:45:05Z","updated_at":"2015-10-21T22:45:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-java/pulls/1129","html_url":"https://github.com/grpc/grpc-java/pull/1129","diff_url":"https://github.com/grpc/grpc-java/pull/1129.diff","patch_url":"https://github.com/grpc/grpc-java/pull/1129.patch"},"body":"Sorry for the large change, this got slightly bigger than I wanted it to make it easier to test.  Netty is a little more difficult to string the host / port fallback, and a little more convoluted.  The idea here is to provide the host, port, and authority, and let the Channel Builder put the pieces together.  Normally the authority is a derivation of the host and port, so they are typically identical and don't result in any behavior change.  In cases where the authority has been overridden, the derived host and port will be null and -1, so the former host and port (from the socket addr) will be used.  \r\n\r\nThis is different than the way OkHttp does it, so it was hard to share anything between them.  I don't *think* ProtocolNegotiators is used out side of netty, but I opted to keep the existing API present for tls(), incase anyone was.  If I can change its method signature, this code becomes a little simpler.\r\n\r\nOne last thing: I didn't add any tests to PN because I have another PR to add them and didn't want to cause myself a merge conflict.  I will add them later.  Trust me man, I'm good for it!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grpc/grpc-java/issues/comments/150045781","html_url":"https://github.com/grpc/grpc-java/pull/1129#issuecomment-150045781","issue_url":"https://api.github.com/repos/grpc/grpc-java/issues/1129","id":150045781,"user":{"login":"carl-mastrangelo","id":8943572,"avatar_url":"https://avatars.githubusercontent.com/u/8943572?v=3","gravatar_id":"","url":"https://api.github.com/users/carl-mastrangelo","html_url":"https://github.com/carl-mastrangelo","followers_url":"https://api.github.com/users/carl-mastrangelo/followers","following_url":"https://api.github.com/users/carl-mastrangelo/following{/other_user}","gists_url":"https://api.github.com/users/carl-mastrangelo/gists{/gist_id}","starred_url":"https://api.github.com/users/carl-mastrangelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carl-mastrangelo/subscriptions","organizations_url":"https://api.github.com/users/carl-mastrangelo/orgs","repos_url":"https://api.github.com/users/carl-mastrangelo/repos","events_url":"https://api.github.com/users/carl-mastrangelo/events{/privacy}","received_events_url":"https://api.github.com/users/carl-mastrangelo/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T22:45:48Z","updated_at":"2015-10-21T22:45:48Z","body":"+ @zhangkun83 I have to admit I haven't taken a hard look at how the channel builders work since your commit this morning, so if something in the PR doesn't make sense, or there is a better way to do it, please let me know."}}