Fix header-to-metadata if clause#11747
Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom Jun 30, 2020
Merged
Conversation
9193267 to
8a88879
Compare
added 2 commits
June 25, 2020 14:55
Signed-off-by: Ariane van der Steldt <avandersteldt@slack-corp.com>
Without the fix, the `on-header-missing` branch would be executed, if the `on-header-present` case is absent, regardless of wether the header was actually absent. Signed-off-by: Ariane van der Steldt <avandersteldt@slack-corp.com>
8a88879 to
1e726b4
Compare
rgs1
reviewed
Jun 25, 2020
| type: STRING | ||
| )EOF"; | ||
| initializeFilter(config); | ||
| Http::TestRequestHeaderMapImpl headers{{"x-version", ""}}; |
Member
There was a problem hiding this comment.
nit: add value to the header (to avoid conflating with the internal handling of headers without a value).
Contributor
Author
There was a problem hiding this comment.
Updated the PR. <3
Member
|
@nahratzah thank you -- looks good to me. Left a small nit. |
Signed-off-by: Ariane van der Steldt <avandersteldt@slack-corp.com>
Member
Member
|
@nahratzah I think if you merge upstream master, the broken test in tsan should pass and we can get this merged. |
Member
|
Note that #11698 is ready for landing 😄 Which means you'd have to merge + resolve conflicts. But I am happy to do it there if this one lands first. |
rgs1
approved these changes
Jun 26, 2020
zuercher
approved these changes
Jun 29, 2020
aimless404
pushed a commit
to aimless404/envoy
that referenced
this pull request
Jun 30, 2020
The else-clause would trip when the on-header-present block was absent, irrespective of if the header was actually absent. Signed-off-by: Ariane van der Steldt <avandersteldt@slack-corp.com> Signed-off-by: Yifan Yang <needyyang@google.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Commit Message: Bugfix header-to-metadata: don't execute on-header-missing clause when header is present
Additional Description: The else-clause would trip when the on-header-present block was absent, irrespective of if the header was actually absent.
Risk Level: Low
Testing: Introduced unit test to cover this case.
Docs Changes: N/A
Release Notes: N/A