nghttpx: Fix bug that causes connection failure with backend proxy URI
This is a regression when we introduced SSL/TLS session resumption in HTTP/2 backend. Before the introduction of session resumption, conn_.tls.ssl is always nullptr when connection is made to proxy. But we have to keep conn_.tls.ssl to enable session resumption, so our code breaks when it is reused. This commit fixes this issue. See GH-421
This commit is contained in:
parent
9b18e47671
commit
dbbed64146
|
@ -1569,13 +1569,6 @@ int Http2Session::connected() {
|
|||
|
||||
conn_.rlimit.startw();
|
||||
|
||||
if (conn_.tls.ssl) {
|
||||
read_ = &Http2Session::tls_handshake;
|
||||
write_ = &Http2Session::tls_handshake;
|
||||
|
||||
return do_write();
|
||||
}
|
||||
|
||||
read_ = &Http2Session::read_clear;
|
||||
write_ = &Http2Session::write_clear;
|
||||
|
||||
|
@ -1583,6 +1576,13 @@ int Http2Session::connected() {
|
|||
return do_write();
|
||||
}
|
||||
|
||||
if (conn_.tls.ssl) {
|
||||
read_ = &Http2Session::tls_handshake;
|
||||
write_ = &Http2Session::tls_handshake;
|
||||
|
||||
return do_write();
|
||||
}
|
||||
|
||||
if (connection_made() != 0) {
|
||||
state_ = CONNECT_FAILING;
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue