Unverified Commit d8e378fe authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa Committed by GitHub

Merge pull request #1080 from nghttp2/nghttpx-fix-crash-with-backend-http-proxy-uri

nghttpx: Fix crash with --backend-http-proxy-uri option
parents 2a694b27 a3ebeeaf
...@@ -577,11 +577,11 @@ int Http2Session::initiate_connection() { ...@@ -577,11 +577,11 @@ int Http2Session::initiate_connection() {
} }
} }
on_write_ = &Http2Session::downstream_write;
on_read_ = &Http2Session::downstream_read;
// We have been already connected when no TLS and proxy is used. // We have been already connected when no TLS and proxy is used.
if (state_ == PROXY_CONNECTED) { if (state_ == PROXY_CONNECTED) {
on_read_ = &Http2Session::read_noop;
on_write_ = &Http2Session::write_noop;
return connected(); return connected();
} }
...@@ -1642,6 +1642,9 @@ int Http2Session::connection_made() { ...@@ -1642,6 +1642,9 @@ int Http2Session::connection_made() {
state_ = Http2Session::CONNECTED; state_ = Http2Session::CONNECTED;
on_write_ = &Http2Session::downstream_write;
on_read_ = &Http2Session::downstream_read;
if (addr_->tls) { if (addr_->tls) {
const unsigned char *next_proto = nullptr; const unsigned char *next_proto = nullptr;
unsigned int next_proto_len = 0; unsigned int next_proto_len = 0;
......
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