Skip to content
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

http: removing envoy.reloadable_features.http_match_on_all_headers #16195

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Removed Config or Runtime
* http: removed ``envoy.reloadable_features.allow_500_after_100`` runtime guard and the legacy code path.
* http: removed ``envoy.reloadable_features.hcm_stream_error_on_invalid_message`` for disabling closing HTTP/1.1 connections on error. Connection-closing can still be disabled by setting the HTTP/1 configuration :ref:`override_stream_error_on_invalid_http_message <envoy_v3_api_field_config.core.v3.Http1ProtocolOptions.override_stream_error_on_invalid_http_message>`.
* http: removed ``envoy.reloadable_features.overload_manager_disable_keepalive_drain_http2``; Envoy will now always send GOAWAY to HTTP2 downstreams when the :ref:`disable_keepalive <config_overload_manager_overload_actions>` overload action is active.
* http: removed ``envoy.reloadable_features.http_match_on_all_headers`` runtime guard and legacy code paths.
* http: removed ``envoy.reloadable_features.unify_grpc_handling`` runtime guard and legacy code paths.
* tls: removed ``envoy.reloadable_features.tls_use_io_handle_bio`` runtime guard and legacy code path.

Expand Down
4 changes: 1 addition & 3 deletions source/common/http/header_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ HeaderUtility::getAllOfHeaderAsString(const HeaderMap& headers, const Http::Lowe
if (header_value.empty()) {
// Empty for clarity. Avoid handling the empty case in the block below if the runtime feature
// is disabled.
} else if (header_value.size() == 1 ||
!Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.http_match_on_all_headers")) {
} else if (header_value.size() == 1) {
result.result_ = header_value[0]->value().getStringView();
} else {
return getAllOfHeaderAsString(header_value, separator);
Expand Down
1 change: 0 additions & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.hash_multiple_header_values",
"envoy.reloadable_features.health_check.graceful_goaway_handling",
"envoy.reloadable_features.health_check.immediate_failure_exclude_from_cluster",
"envoy.reloadable_features.http_match_on_all_headers",
"envoy.reloadable_features.http_set_copy_replace_all_headers",
"envoy.reloadable_features.http_transport_failure_reason_in_body",
"envoy.reloadable_features.http_upstream_wait_connect_response",
Expand Down
13 changes: 0 additions & 13 deletions test/common/http/header_utility_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,6 @@ exact_match: a,b
)EOF"));
// Make sure that an exact match on "a,b" does in fact work.
EXPECT_TRUE(HeaderUtility::matchHeaders(headers, header_data));

Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.http_match_on_all_headers", "false"}});
// Flipping runtime to false should make "a,b" no longer match because we will match on the first
// header only.
EXPECT_FALSE(HeaderUtility::matchHeaders(headers, header_data));

header_data[0] = std::make_unique<HeaderUtility::HeaderData>(parseHeaderMatcherFromYaml(R"EOF(
name: match-header
exact_match: a
)EOF"));
// With runtime off, exact match on "a" should pass.
EXPECT_TRUE(HeaderUtility::matchHeaders(headers, header_data));
}

TEST(MatchHeadersTest, MustMatchAllHeaderData) {
Expand Down