From 57230b4029398a48ea6dd7d69d1dd0ab10fd079b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 4 Jul 2014 02:03:09 +0900 Subject: [PATCH] nghttpx: Fix regression POST http2 downstream does not work --- src/shrpx_http2_downstream_connection.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;