TEST_P(HeaderIntegrationTest, PathWithEscapedSlashesRejected) {
  path_with_escaped_slashes_action_ = envoy::extensions::filters::network::http_connection_manager::
      v3::HttpConnectionManager::REJECT_REQUEST;
  initializeFilter(HeaderMode::Append, false);
  registerTestServerPorts({"http"});
  codec_client_ = makeHttpConnection(makeClientConnection(lookupPort("http")));
  IntegrationStreamDecoderPtr response =
      codec_client_->makeHeaderOnlyRequest(Http::TestRequestHeaderMapImpl{
          {":method", "GET"},
          {":path", "/private%2f../public"},
          {":scheme", "http"},
          {":authority", "path-sanitization.com"},
      });
  EXPECT_TRUE(response->waitForEndStream());
  Http::TestResponseHeaderMapImpl response_headers{response->headers()};
  compareHeaders(response_headers, Http::TestResponseHeaderMapImpl{
                                       {"server", "envoy"},
                                       {"connection", "close"},
                                       {":status", "400"},
                                   });
}
TEST_P(HeaderIntegrationTest, PathWithEscapedSlashesRejected) {
  path_with_escaped_slashes_action_ = envoy::extensions::filters::network::http_connection_manager::
      v3::HttpConnectionManager::REJECT_REQUEST;
  initializeFilter(HeaderMode::Append, false);
  registerTestServerPorts({"http"});
  codec_client_ = makeHttpConnection(makeClientConnection(lookupPort("http")));
  IntegrationStreamDecoderPtr response =
      codec_client_->makeHeaderOnlyRequest(Http::TestRequestHeaderMapImpl{
          {":method", "GET"},
          {":path", "/private%2f../public"},
          {":scheme", "http"},
          {":authority", "path-sanitization.com"},
      });
  EXPECT_TRUE(response->waitForEndStream());
  Http::TestResponseHeaderMapImpl response_headers{response->headers()};
  compareHeaders(response_headers, Http::TestResponseHeaderMapImpl{
                                       {"server", "envoy"},
                                       {"connection", "close"},
                                       {":status", "400"},
                                   });
}