nghttpx: Fix crash with plain text HTTP
This commit is contained in:
parent
e2de2fee69
commit
3575a1325e
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue