{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/7346","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/7346/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/7346/comments","events_url":"https://api.github.com/repos/netty/netty/issues/7346/events","html_url":"https://github.com/netty/netty/issues/7346","id":268894736,"number":7346,"title":"NPN clients fail when talking to NPN servers that don't advertise","user":{"login":"mosesn","id":156562,"avatar_url":"https://avatars3.githubusercontent.com/u/156562?v=4","gravatar_id":"","url":"https://api.github.com/users/mosesn","html_url":"https://github.com/mosesn","followers_url":"https://api.github.com/users/mosesn/followers","following_url":"https://api.github.com/users/mosesn/following{/other_user}","gists_url":"https://api.github.com/users/mosesn/gists{/gist_id}","starred_url":"https://api.github.com/users/mosesn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosesn/subscriptions","organizations_url":"https://api.github.com/users/mosesn/orgs","repos_url":"https://api.github.com/users/mosesn/repos","events_url":"https://api.github.com/users/mosesn/events{/privacy}","received_events_url":"https://api.github.com/users/mosesn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-26T20:08:55Z","updated_at":"2017-11-21T09:36:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Expected behavior\r\nNetty clients that support NPN should be able to talk to any server that supports NPN.\r\n\r\n### Actual behavior\r\nWhen netty clients using tcnative + NPN try to talk to servers that support NPN but don't advertise any protocols, netty barfs.\r\n\r\n### Steps to reproduce\r\nUse an SslContextBuilder, and call the applicationProtocolConfig, passing an ApplicationProtocolConfig where the Protocol is either Protocol.NPN_AND_ALPN or Protocol.NPN.  Then talk to a server that supports NPN but doesn't advertise NPN protocols, like happylifestyle.com or ossifrage.net.\r\n\r\n### Minimal yet complete reproducer code (or URL to code)\r\nUsing finagle:\r\n\r\n```\r\nimport com.twitter.util.Await\r\nimport com.twitter.finagle.Http\r\nimport com.twitter.finagle.http.Request\r\nval req = Request(\"/\")\r\nreq.host = \"happylifestyle.com\"\r\nval client = Http.client.configuredParams(Http.Http2).withTls(\"happylifestyle.com\").newService(\"happylifestyle.com:443\")\r\nAwait.result(client(req))\r\n```\r\n\r\nYou can also do this when talking to ossifrage.net.\r\n\r\nNote if you use `openssl s_client -tlsextdebug -connect ossifrage.net:443 -nextprotoneg 'h2,http/1.1'` that it doesn't advertise any protocols.\r\n\r\n### Netty version\r\n\r\n4.1.16.Final\r\n\r\n### tcnative version\r\n\r\n2.0.6.Final\r\n\r\n### JVM version (e.g. `java -version`)\r\n\r\nJDK8\r\n\r\n### OS version (e.g. `uname -a`)\r\n\r\nDarwin tw-mbp13-mnakamura.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/345969325","html_url":"https://github.com/netty/netty/issues/7346#issuecomment-345969325","issue_url":"https://api.github.com/repos/netty/netty/issues/7346","id":345969325,"user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T09:36:07Z","updated_at":"2017-11-21T09:36:07Z","author_association":"OWNER","body":"@mosesn ping "}}
{"actor":{"display_login":"normanmaurer"}}