Commit dbbed641 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

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
parent 9b18e476
......@@ -1569,17 +1569,17 @@ int Http2Session::connected() {
conn_.rlimit.startw();
if (conn_.tls.ssl) {
read_ = &Http2Session::tls_handshake;
write_ = &Http2Session::tls_handshake;
read_ = &Http2Session::read_clear;
write_ = &Http2Session::write_clear;
if (state_ == PROXY_CONNECTING) {
return do_write();
}
read_ = &Http2Session::read_clear;
write_ = &Http2Session::write_clear;
if (conn_.tls.ssl) {
read_ = &Http2Session::tls_handshake;
write_ = &Http2Session::tls_handshake;
if (state_ == PROXY_CONNECTING) {
return do_write();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment