diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index cf9316e3..b3e668e5 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -408,8 +408,12 @@ int Http2DownstreamConnection::push_request_headers() DCLOG(INFO, this) << "HTTP request headers\n" << ss.str(); } + auto content_length = + downstream_->get_norm_request_header("content-length") != end_headers; + if(downstream_->get_request_method() == "CONNECT" || - chunked_encoding || downstream_->get_request_http2_expect_body()) { + chunked_encoding || content_length || + downstream_->get_request_http2_expect_body()) { // Request-body is expected. nghttp2_data_provider data_prd; data_prd.source.ptr = this;