Merge pull request #1080 from nghttp2/nghttpx-fix-crash-with-backend-http-proxy-uri
nghttpx: Fix crash with --backend-http-proxy-uri option
This commit is contained in:
commit
d8e378fea9
|
@ -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() {
|
||||||
|
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue