diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst index 15f30db08ed3..1854d7e45fe8 100644 --- a/docs/root/version_history/current.rst +++ b/docs/root/version_history/current.rst @@ -42,6 +42,7 @@ Removed Config or Runtime * http: removed legacy header sanitization and the runtime guard `envoy.reloadable_features.strict_header_validation`. * http: removed legacy transfer-encoding enforcement and runtime guard `envoy.reloadable_features.reject_unsupported_transfer_encodings`. * http: removed configurable strict host validation and runtime guard `envoy.reloadable_features.strict_authority_validation`. +* http: removed the connection header sanitization runtime guard `envoy.reloadable_features.connection_header_sanitization`. New Features ------------ diff --git a/source/common/http/http1/codec_impl.cc b/source/common/http/http1/codec_impl.cc index c9cf88f569e8..2b15971bc52e 100644 --- a/source/common/http/http1/codec_impl.cc +++ b/source/common/http/http1/codec_impl.cc @@ -448,8 +448,6 @@ ConnectionImpl::ConnectionImpl(Network::Connection& connection, CodecStats& stat : connection_(connection), stats_(stats), header_key_formatter_(std::move(header_key_formatter)), processing_trailers_(false), handling_upgrade_(false), reset_stream_called_(false), deferred_end_stream_headers_(false), - connection_header_sanitization_(Runtime::runtimeFeatureEnabled( - "envoy.reloadable_features.connection_header_sanitization")), enable_trailers_(enable_trailers), strict_1xx_and_204_headers_(Runtime::runtimeFeatureEnabled( "envoy.reloadable_features.strict_1xx_and_204_response_headers")), @@ -848,7 +846,7 @@ int ServerConnectionImpl::onHeadersComplete() { ENVOY_CONN_LOG(trace, "Server: onHeadersComplete size={}", connection_, headers->size()); const char* method_string = http_method_str(static_cast(parser_.method)); - if (!handling_upgrade_ && connection_header_sanitization_ && headers->Connection()) { + if (!handling_upgrade_ && headers->Connection()) { // If we fail to sanitize the request, return a 400 to the client if (!Utility::sanitizeConnectionHeader(*headers)) { absl::string_view header_value = headers->getConnectionValue(); diff --git a/source/common/http/http1/codec_impl.h b/source/common/http/http1/codec_impl.h index c74c0adae87c..511f794de01d 100644 --- a/source/common/http/http1/codec_impl.h +++ b/source/common/http/http1/codec_impl.h @@ -253,7 +253,6 @@ class ConnectionImpl : public virtual Connection, protected Logger::Loggablesize()); const char* method_string = http_method_str(static_cast(parser_.method)); - if (!handling_upgrade_ && connection_header_sanitization_ && headers->Connection()) { + if (!handling_upgrade_ && headers->Connection()) { // If we fail to sanitize the request, return a 400 to the client if (!Utility::sanitizeConnectionHeader(*headers)) { absl::string_view header_value = headers->getConnectionValue(); diff --git a/source/common/http/http1/codec_impl_legacy.h b/source/common/http/http1/codec_impl_legacy.h index 622d9441459b..b553c5f9f9c7 100644 --- a/source/common/http/http1/codec_impl_legacy.h +++ b/source/common/http/http1/codec_impl_legacy.h @@ -257,7 +257,6 @@ class ConnectionImpl : public virtual Connection, protected Logger::Loggable