From ff070187203d77352b4e085c623242cb49342882 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 28 Mar 2016 22:05:38 +0900 Subject: [PATCH] nghttpx: Fix bug that proxy with HTTP/1.1 CONNECT did not work This was a regression in 5fbe4cc2257d95dfa51c5dd8969b3f5201e0f9db. --- src/shrpx_http2_downstream_connection.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }