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
4 changes: 4 additions & 0 deletions source/common/http/conn_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ Network::FilterStatus ConnectionManagerImpl::onData(Buffer::Instance& data, bool
}
} while (redispatch);

if (!read_callbacks_->connection().streamInfo().protocol()) {
read_callbacks_->connection().streamInfo().protocol(codec_->protocol());
}

return Network::FilterStatus::StopIteration;
}

Expand Down
3 changes: 3 additions & 0 deletions test/common/http/conn_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4138,6 +4138,7 @@ TEST_F(HttpConnectionManagerImplTest, FilterHeadReply) {
EXPECT_CALL(*decoder_filters_[0], decodeComplete());
// Kick off the incoming data.
Buffer::OwnedImpl fake_input("1234");
EXPECT_CALL(filter_callbacks_.connection_.stream_info_, protocol(Envoy::Http::Protocol::Http11));
conn_manager_->onData(fake_input, false);
}

Expand Down Expand Up @@ -4613,6 +4614,7 @@ TEST_F(HttpConnectionManagerImplTest, FilterDirectDecodeEncodeDataNoTrailers) {

// Kick off the incoming data.
Buffer::OwnedImpl fake_input("1234");
EXPECT_CALL(filter_callbacks_.connection_.stream_info_, protocol(Envoy::Http::Protocol::Http11));
conn_manager_->onData(fake_input, false);

Buffer::OwnedImpl decoded_data_to_forward;
Expand Down Expand Up @@ -4791,6 +4793,7 @@ TEST_F(HttpConnectionManagerImplTest, MultipleFilters) {

// Kick off the incoming data.
Buffer::OwnedImpl fake_input("1234");
EXPECT_CALL(filter_callbacks_.connection_.stream_info_, protocol(Envoy::Http::Protocol::Http11));
conn_manager_->onData(fake_input, false);

// Mimic a decoder filter that trapped data and now sends it on, since the data was buffered
Expand Down