Skip to content

Modify Header Value Match action to pivots on expecting match#810

Merged
ccaraman merged 6 commits into
masterfrom
header-not-present-rl
Apr 21, 2017
Merged

Modify Header Value Match action to pivots on expecting match#810
ccaraman merged 6 commits into
masterfrom
header-not-present-rl

Conversation

@ccaraman
Copy link
Copy Markdown
Contributor

The Header Value Match action sets a descriptor entry depending on if the expected outcome of comparing request headers to the config is to match or not.

@ccaraman
Copy link
Copy Markdown
Contributor Author

@lyft/network-team

will happen if all the headers in the config are present in the request with the same values (or
based on presence if the ``value`` field is not in the config).
expect_match
*(optional, boolean)* Specifies if the action should append a descriptor when it expects a match
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence is redundant and a little confusing. The following two sentences explain very clearly what this value accomplishes.

)EOF";

SetUpTest(json);
Http::TestHeaderMapImpl header{{"x-header-name", "fake_value"}};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the header value to not_same_value or something similar would make this test more clear, i.e the value is not the same as the descriptor_value, and what is loaded to the descriptors is the descriptor value.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks.

@ccaraman ccaraman merged commit 995abf1 into master Apr 21, 2017
@ccaraman ccaraman deleted the header-not-present-rl branch April 21, 2017 22:45
jpsim pushed a commit that referenced this pull request Nov 28, 2022
* kotlin: replace Detekt runner script with Bazel rule

Signed-off-by: Artur Dryomov <artur.dryomov@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
* kotlin: replace Detekt runner script with Bazel rule

Signed-off-by: Artur Dryomov <artur.dryomov@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
mathetake added a commit that referenced this pull request Mar 3, 2026
**Description**

Previously, unknown path was responded as an internal error as opposed
to the fact that it's an 404 with the user input root cause. This fixes
the extproc code that way, now that users will be able to know what's
wrong with the operation instead of getting the cryptic 500 error.

**Related Issues/PRs (if applicable)**

Contributes to #810
Closes #724

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants