From 5fbe4cc2257d95dfa51c5dd8969b3f5201e0f9db Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 28 Feb 2016 23:21:57 +0900 Subject: [PATCH] nghttpx: Clear upgrade_request flag when Downstream is attached to HTTP/2 backend --- src/shrpx_http2_downstream_connection.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index 6aa97d1f..b5accaa2 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -105,6 +105,11 @@ int Http2DownstreamConnection::attach_downstream(Downstream *downstream) { downstream_ = downstream; downstream_->reset_downstream_rtimer(); + auto &req = downstream_->request(); + + // HTTP/2 disables HTTP Upgrade. + req.upgrade_request = false; + return 0; }