TEST_P(DownstreamProtocolIntegrationTest, ContentLengthLargerThanPayload) {
  if (downstreamProtocol() == Http::CodecType::HTTP1) {
    // HTTP/1.x request rely on Content-Length header to determine payload length. So there is no
    // inconsistency but the request will hang there waiting for the rest bytes.
    return;
  }

  initialize();
  codec_client_ = makeHttpConnection(lookupPort("http"));
  auto response =
      codec_client_->makeRequestWithBody(Http::TestRequestHeaderMapImpl{{":method", "POST"},
                                                                        {":path", "/test/long/url"},
                                                                        {":scheme", "http"},
                                                                        {":authority", "host"},
                                                                        {"content-length", "1025"}},
                                         1024);

  // Inconsistency in content-length header and the actually body length should be treated as a
  // stream error.
  ASSERT_TRUE(response->waitForReset());
  EXPECT_EQ(Http::StreamResetReason::RemoteReset, response->resetReason());
}
TEST_P(DownstreamProtocolIntegrationTest, ContentLengthLargerThanPayload) {
  if (downstreamProtocol() == Http::CodecType::HTTP1) {
     
     
    return;
  }

  initialize();
  codec_client_ = makeHttpConnection(lookupPort("http"));
  auto response =
      codec_client_->makeRequestWithBody(Http::TestRequestHeaderMapImpl{{":method", "POST"},
                                                                        {":path", "/test/long/url"},
                                                                        {":scheme", "http"},
                                                                        {":authority", "host"},
                                                                        {"content-length", "1025"}},
                                         1024);

   
   
  ASSERT_TRUE(response->waitForReset());
  EXPECT_EQ(Http::StreamResetReason::RemoteReset, response->resetReason());
}