nghttpx: Fix regression POST http2 downstream does not work

This commit is contained in:
Tatsuhiro Tsujikawa 2014-07-04 02:03:09 +09:00
parent 3111138ca3
commit 57230b4029
1 changed files with 5 additions and 1 deletions

View File

@ -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;