-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[filters] Prevent a filter from sending local reply and continue #14416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mattklein123
merged 14 commits into
envoyproxy:master
from
asraa:continue-after-local-reply
Dec 21, 2020
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2ddc5f5
handle local reply and continue
asraa 276ebb7
different fix
asraa 609a6d9
fix complete
asraa 8c6eb78
fix flakiness in test and log msg
asraa 90a1d29
fix hcm debug tests
asraa b47f26c
just stop continue after sendlocal
asraa a7b95d2
Revert "just stop continue after sendlocal"
asraa 2df4777
fix oath2
asraa b788903
Revert "fix oath2"
asraa 1e1e8a8
Revert "Revert "just stop continue after sendlocal""
asraa 32e4872
Merge remote-tracking branch 'upstream/master' into continue-after-lo…
asraa 3cb7ceb
update now that oauth fixed
asraa 62208ba
add debug death test
asraa 763cde8
fix format
asraa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
30 changes: 30 additions & 0 deletions
30
test/integration/filters/continue_after_local_reply_filter.cc
This file contains hidden or 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,30 @@ | ||
| #include "envoy/registry/registry.h" | ||
| #include "envoy/server/filter_config.h" | ||
|
|
||
| #include "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" | ||
|
|
||
| #include "gtest/gtest.h" | ||
|
|
||
| namespace Envoy { | ||
|
|
||
| // A filter that only calls Http::FilterHeadersStatus::Continue after a local reply. | ||
| class ContinueAfterLocalReplyFilter : public Http::PassThroughFilter { | ||
| public: | ||
| constexpr static char name[] = "continue-after-local-reply-filter"; | ||
|
|
||
| Http::FilterHeadersStatus decodeHeaders(Http::RequestHeaderMap&, bool) override { | ||
| decoder_callbacks_->sendLocalReply(Envoy::Http::Code::OK, "", nullptr, absl::nullopt, | ||
| "ContinueAfterLocalReplyFilter is ready"); | ||
| return Http::FilterHeadersStatus::Continue; | ||
| } | ||
| }; | ||
|
|
||
| constexpr char ContinueAfterLocalReplyFilter::name[]; | ||
| static Registry::RegisterFactory<SimpleFilterConfig<ContinueAfterLocalReplyFilter>, | ||
| Server::Configuration::NamedHttpFilterConfigFactory> | ||
| register_; | ||
|
|
||
| } // namespace Envoy |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.