forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate state for tracking downstream end_stream in filter manager a…
…nd HCM Signed-off-by: Yan Avlasov <yavlasov@google.com>
- Loading branch information
1 parent
ec09f36
commit 1127fac
Showing
9 changed files
with
179 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
test/integration/filters/stop_in_headers_continue_in_data_filter.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <string> | ||
|
||
#include "envoy/http/filter.h" | ||
#include "envoy/registry/registry.h" | ||
#include "envoy/server/filter_config.h" | ||
|
||
#include "source/extensions/filters/http/common/pass_through_filter.h" | ||
|
||
#include "test/extensions/filters/http/common/empty_http_filter_config.h" | ||
#include "test/integration/filters/common.h" | ||
|
||
namespace Envoy { | ||
|
||
// A test filter that stops iteration of headers request/response | ||
// then injects a body later. | ||
class StopInHeadersContinueInBodyFilter : public Http::PassThroughFilter { | ||
public: | ||
constexpr static char name[] = "stop-in-headers-continue-in-body-filter"; | ||
|
||
Http::FilterHeadersStatus decodeHeaders(Http::RequestHeaderMap&, bool /* end_stream */) override { | ||
return Http::FilterHeadersStatus::StopIteration; | ||
} | ||
|
||
Http::FilterDataStatus decodeData(Buffer::Instance&, bool) override { | ||
return Http::FilterDataStatus::Continue; | ||
} | ||
}; | ||
|
||
static Registry::RegisterFactory<SimpleFilterConfig<StopInHeadersContinueInBodyFilter>, | ||
Server::Configuration::NamedHttpFilterConfigFactory> | ||
register_; | ||
static Registry::RegisterFactory<SimpleFilterConfig<StopInHeadersContinueInBodyFilter>, | ||
Server::Configuration::UpstreamHttpFilterConfigFactory> | ||
register_upstream_; | ||
} // namespace Envoy |
Oops, something went wrong.