Skip to content

Commit

Permalink
[http codec] case-insensetive transfer-encoding checks, Fixes envoypr…
Browse files Browse the repository at this point in the history
…oxy#10041

Signed-off-by: Oleg Guba <[email protected]>
  • Loading branch information
veshij committed Feb 13, 2020
1 parent 7e7c3ea commit c9dc29d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/http/http1/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ int ConnectionImpl::onHeadersCompleteBase() {
absl::string_view encoding = current_headers.TransferEncoding()->value().getStringView();
if (Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.reject_unsupported_transfer_encodings") &&
encoding != Headers::get().TransferEncodingValues.Identity &&
encoding != Headers::get().TransferEncodingValues.Chunked) {
!StringUtil::caseCompare(encoding, Headers::get().TransferEncodingValues.Identity) &&
!StringUtil::caseCompare(encoding, Headers::get().TransferEncodingValues.Chunked)) {
error_code_ = Http::Code::NotImplemented;
sendProtocolError();
throw CodecProtocolException("http/1.1 protocol error: unsupported transfer encoding");
Expand Down

0 comments on commit c9dc29d

Please sign in to comment.