nghttpx: Fix crash with plain text HTTP

This commit is contained in:
Tatsuhiro Tsujikawa 2018-09-15 12:16:23 +09:00
parent e2de2fee69
commit 3575a1325e
2 changed files with 2 additions and 2 deletions

View File

@ -340,7 +340,7 @@ int Http2DownstreamConnection::push_request_headers() {
#if OPENSSL_1_1_1_API #if OPENSSL_1_1_1_API
auto conn = handler->get_connection(); auto conn = handler->get_connection();
if (!SSL_is_init_finished(conn->tls.ssl)) { if (conn->tls.ssl && !SSL_is_init_finished(conn->tls.ssl)) {
nva.push_back(http2::make_nv_ll("early-data", "1")); nva.push_back(http2::make_nv_ll("early-data", "1"));
} }
#endif // OPENSSL_1_1_1_API #endif // OPENSSL_1_1_1_API

View File

@ -590,7 +590,7 @@ int HttpDownstreamConnection::push_request_headers() {
#if OPENSSL_1_1_1_API #if OPENSSL_1_1_1_API
auto conn = handler->get_connection(); auto conn = handler->get_connection();
if (!SSL_is_init_finished(conn->tls.ssl)) { if (conn->tls.ssl && !SSL_is_init_finished(conn->tls.ssl)) {
buf->append("Early-Data: 1\r\n"); buf->append("Early-Data: 1\r\n");
} }
#endif // OPENSSL_1_1_1_API #endif // OPENSSL_1_1_1_API