Skip to content
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 @@ -29,6 +29,7 @@ Removed Config or Runtime
*Normally occurs at the end of the* :ref:`deprecation period <deprecated>`

* compression: removed ``envoy.reloadable_features.enable_compression_without_content_length_header`` runtime guard and legacy code paths.
* grpc-web: removed ``envoy.reloadable_features.grpc_web_fix_non_proto_encoded_response_handling`` and legacy code paths.
* health check: removed ``envoy.reloadable_features.health_check.immediate_failure_exclude_from_cluster`` runtime guard and legacy code paths.
* http: removed ``envoy.reloadable_features.add_and_validate_scheme_header`` and legacy code paths.
* http: removed ``envoy.reloadable_features.check_unsupported_typed_per_filter_config``, Envoy will always check unsupported typed per filter config if the filter isn't optional.
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 @@ -62,7 +62,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.disable_tls_inspector_injection",
"envoy.reloadable_features.fix_added_trailers",
"envoy.reloadable_features.grpc_bridge_stats_disabled",
"envoy.reloadable_features.grpc_web_fix_non_proto_encoded_response_handling",
"envoy.reloadable_features.hash_multiple_header_values",
"envoy.reloadable_features.health_check.graceful_goaway_handling",
"envoy.reloadable_features.http2_consume_stream_refused_errors",
Expand Down
8 changes: 2 additions & 6 deletions source/extensions/filters/http/grpc_web/grpc_web_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "source/common/grpc/context_impl.h"
#include "source/common/http/headers.h"
#include "source/common/http/utility.h"
#include "source/common/runtime/runtime_features.h"

namespace Envoy {
namespace Extensions {
Expand Down Expand Up @@ -112,11 +111,8 @@ bool GrpcWebFilter::hasProtoEncodedGrpcWebContentType(
// If response headers do not contain valid response headers, it needs transformation.
bool GrpcWebFilter::needsTransformationForNonProtoEncodedResponse(Http::ResponseHeaderMap& headers,
bool end_stream) const {
return Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.grpc_web_fix_non_proto_encoded_response_handling") &&
// We transform the response unless it is already a gRPC or proto-encoded gRPC-Web
// response.
!Grpc::Common::isGrpcResponseHeaders(headers, end_stream) &&
// We transform the response unless it is already a gRPC or proto-encoded gRPC-Web response.
return !Grpc::Common::isGrpcResponseHeaders(headers, end_stream) &&
!isProtoEncodedGrpcWebResponseHeaders(headers);
}

Expand Down
1 change: 0 additions & 1 deletion test/extensions/filters/http/grpc_web/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ envoy_extension_cc_test(
"//source/extensions/filters/http/grpc_web:grpc_web_filter_lib",
"//test/mocks/http:http_mocks",
"//test/test_common:global_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
],
)
Expand Down
20 changes: 0 additions & 20 deletions test/extensions/filters/http/grpc_web/grpc_web_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "test/mocks/http/mocks.h"
#include "test/test_common/global.h"
#include "test/test_common/printers.h"
#include "test/test_common/test_runtime.h"
#include "test/test_common/utility.h"

#include "gmock/gmock.h"
Expand Down Expand Up @@ -419,25 +418,6 @@ TEST_F(GrpcWebFilterTest, InvalidUpstreamResponseForTextWithTrailers) {
EXPECT_EQ("hellohello", response_headers.get_(Http::Headers::get().GrpcMessage));
}

TEST_F(GrpcWebFilterTest, InvalidUpstreamResponseForTextSkipTransformation) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.grpc_web_fix_non_proto_encoded_response_handling", "false"}});

Http::TestRequestHeaderMapImpl request_headers{
{"content-type", Http::Headers::get().ContentTypeValues.GrpcWebText},
{"accept", Http::Headers::get().ContentTypeValues.GrpcWebText},
{":path", "/"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_.decodeHeaders(request_headers, false));

Http::TestResponseHeaderMapImpl response_headers{{":status", "400"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_.encodeHeaders(response_headers, false));
Buffer::OwnedImpl data("hello");
// Since the client expects grpc-web-text and the upstream response does not contain gRPC frames,
// the iteration is paused.
EXPECT_EQ(Http::FilterDataStatus::StopIterationNoBuffer, filter_.encodeData(data, false));
}

TEST_P(GrpcWebFilterTest, StatsNoCluster) {
Http::TestRequestHeaderMapImpl request_headers{
{"content-type", request_content_type()},
Expand Down