Skip to content

Commit

Permalink
http: removing envoy.reloadable_features.reject_unsupported_transfer_…
Browse files Browse the repository at this point in the history
…encodings (#11957)

Removing envoy.reloadable_features.reject_unsupported_transfer_encodings and associated code path.

Risk Level: low
Testing: n/a
Docs Changes: n/a
Release Notes: yes
Fixes #11935

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
  • Loading branch information
alyssawilk authored Jul 9, 2020
1 parent e6da9f1 commit 36c3b10
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Removed Config or Runtime
*Normally occurs at the end of the* :ref:`deprecation period <deprecated>`

* 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`.

New Features
------------
Expand Down
5 changes: 1 addition & 4 deletions source/common/http/http1/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,6 @@ ConnectionImpl::ConnectionImpl(Network::Connection& connection, CodecStats& stat
connection_header_sanitization_(Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.connection_header_sanitization")),
enable_trailers_(enable_trailers),
reject_unsupported_transfer_encodings_(Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.reject_unsupported_transfer_encodings")),
strict_1xx_and_204_headers_(Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.strict_1xx_and_204_response_headers")),
output_buffer_([&]() -> void { this->onBelowLowWatermark(); },
Expand Down Expand Up @@ -689,8 +687,7 @@ int ConnectionImpl::onHeadersCompleteBase() {
// CONNECT request has no defined semantics, and may be rejected.
if (request_or_response_headers.TransferEncoding()) {
const absl::string_view encoding = request_or_response_headers.getTransferEncodingValue();
if ((reject_unsupported_transfer_encodings_ &&
!absl::EqualsIgnoreCase(encoding, Headers::get().TransferEncodingValues.Chunked)) ||
if (!absl::EqualsIgnoreCase(encoding, Headers::get().TransferEncodingValues.Chunked) ||
parser_.method == HTTP_CONNECT) {
error_code_ = Http::Code::NotImplemented;
sendProtocolError(Http1ResponseCodeDetails::get().InvalidTransferEncoding);
Expand Down
1 change: 0 additions & 1 deletion source/common/http/http1/codec_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ class ConnectionImpl : public virtual Connection, protected Logger::Loggable<Log
bool deferred_end_stream_headers_ : 1;
const bool connection_header_sanitization_ : 1;
const bool enable_trailers_ : 1;
const bool reject_unsupported_transfer_encodings_ : 1;
const bool strict_1xx_and_204_headers_ : 1;

private:
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 @@ -57,7 +57,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.test_feature_true",
"envoy.reloadable_features.connection_header_sanitization",
"envoy.reloadable_features.strict_authority_validation",
"envoy.reloadable_features.reject_unsupported_transfer_encodings",
// Begin alphabetically sorted section.
"envoy.reloadable_features.activate_fds_next_event_loop",
"envoy.deprecated_features.allow_deprecated_extension_names",
Expand Down

0 comments on commit 36c3b10

Please sign in to comment.