From 43b045e84c57117a081221729baf053b6095ff84 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 28 May 2016 19:50:36 +0900 Subject: [PATCH] nghttpx: Fix compile error with gcc --- src/shrpx_http2_downstream_connection.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index ab5c20d2..18de7e78 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -311,13 +311,6 @@ int Http2DownstreamConnection::push_request_headers() { http2::copy_headers_to_nva_nocopy(nva, req.fs.headers()); - bool chunked_encoding = false; - auto transfer_encoding = req.fs.header(http2::HD_TRANSFER_ENCODING); - if (transfer_encoding && - util::strieq_l("chunked", (*transfer_encoding).value)) { - chunked_encoding = true; - } - if (!http2conf.no_cookie_crumbling) { downstream_->crumble_request_cookie(nva); } @@ -426,6 +419,8 @@ int Http2DownstreamConnection::push_request_headers() { DCLOG(INFO, this) << "HTTP request headers\n" << ss.str(); } + auto transfer_encoding = req.fs.header(http2::HD_TRANSFER_ENCODING); + // Add body as long as transfer-encoding is given even if // req.fs.content_length == 0 to forward trailer fields. if (req.method == HTTP_CONNECT || transfer_encoding ||