nghttpx: Fix crash with http2 backend

This commit is contained in:
Tatsuhiro Tsujikawa 2016-01-21 17:09:50 +09:00
parent eb8649bf9b
commit 2faf9623ce
1 changed files with 3 additions and 3 deletions

View File

@ -331,9 +331,9 @@ int Http2Session::initiate_connection() {
conn_.set_ssl(ssl);
}
StringRef sni_name = !get_config()->tls.backend_sni_name.empty()
? get_config()->tls.backend_sni_name
: downstream_addr.host;
auto sni_name = !get_config()->tls.backend_sni_name.empty()
? StringRef(get_config()->tls.backend_sni_name)
: StringRef(downstream_addr.host);
if (!util::numeric_host(sni_name.c_str())) {
// TLS extensions: SNI. There is no documentation about the return