diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst index 4367cea80806..44ddbcdf5d35 100644 --- a/docs/root/version_history/current.rst +++ b/docs/root/version_history/current.rst @@ -27,6 +27,7 @@ Removed Config or Runtime *Normally occurs at the end of the* :ref:`deprecation period ` * access_logs: removed legacy unbounded access logs and runtime guard `envoy.reloadable_features.disallow_unbounded_access_logs`. +* http: removed legacy HTTP/1.1 error reporting path and runtime guard `envoy.reloadable_features.early_errors_via_hcm`. New Features ------------ diff --git a/source/common/http/http1/codec_impl.cc b/source/common/http/http1/codec_impl.cc index bbbff2035344..ea9ad820d43c 100644 --- a/source/common/http/http1/codec_impl.cc +++ b/source/common/http/http1/codec_impl.cc @@ -1096,10 +1096,6 @@ void ServerConnectionImpl::sendProtocolErrorOld(absl::string_view details) { } Status ServerConnectionImpl::sendProtocolError(absl::string_view details) { - if (!Runtime::runtimeFeatureEnabled("envoy.reloadable_features.early_errors_via_hcm")) { - sendProtocolErrorOld(details); - return okStatus(); - } // We do this here because we may get a protocol error before we have a logical stream. if (!active_request_.has_value()) { RETURN_IF_ERROR(onMessageBeginBase()); diff --git a/source/common/runtime/runtime_features.cc b/source/common/runtime/runtime_features.cc index 4334fc72c922..cf5187240fe3 100644 --- a/source/common/runtime/runtime_features.cc +++ b/source/common/runtime/runtime_features.cc @@ -64,7 +64,6 @@ constexpr const char* runtime_features[] = { "envoy.reloadable_features.consume_all_retry_headers", "envoy.reloadable_features.check_ocsp_policy", "envoy.reloadable_features.disable_tls_inspector_injection", - "envoy.reloadable_features.early_errors_via_hcm", "envoy.reloadable_features.enable_dns_cache_circuit_breakers", "envoy.reloadable_features.fix_upgrade_response", "envoy.reloadable_features.fix_wildcard_matching", diff --git a/test/common/http/http1/codec_impl_test.cc b/test/common/http/http1/codec_impl_test.cc index c2eb068cf3f5..e20a89f2d7b0 100644 --- a/test/common/http/http1/codec_impl_test.cc +++ b/test/common/http/http1/codec_impl_test.cc @@ -930,24 +930,6 @@ TEST_F(Http1ServerConnectionImplTest, SimpleGet) { EXPECT_EQ(0U, buffer.length()); } -TEST_F(Http1ServerConnectionImplTest, BadRequestNoStreamLegacy) { - TestScopedRuntime scoped_runtime; - Runtime::LoaderSingleton::getExisting()->mergeValues( - {{"envoy.reloadable_features.early_errors_via_hcm", "false"}}); - initialize(); - - std::string output; - ON_CALL(connection_, write(_, _)).WillByDefault(AddBufferToString(&output)); - - MockRequestDecoder decoder; - EXPECT_CALL(callbacks_, newStream(_, _)).Times(0); - EXPECT_CALL(decoder, sendLocalReply(_, _, _, _, _, _)).Times(0); - - Buffer::OwnedImpl buffer("bad"); - auto status = codec_->dispatch(buffer); - EXPECT_TRUE(isCodecProtocolError(status)); -} - // Test that if the stream is not created at the time an error is detected, it // is created as part of sending the protocol error. TEST_F(Http1ServerConnectionImplTest, BadRequestNoStream) {