diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index 9f209a25..c723b620 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -108,7 +108,9 @@ int Http2DownstreamConnection::attach_downstream(Downstream *downstream) { auto &req = downstream_->request(); // HTTP/2 disables HTTP Upgrade. - req.upgrade_request = false; + if (req.method != HTTP_CONNECT) { + req.upgrade_request = false; + } return 0; }