Skip to content

Commit

Permalink
Add asserts
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Avlasov <yavlasov@google.com>
  • Loading branch information
yanavlasov committed Aug 23, 2024
1 parent 49b6162 commit c02ac47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/common/http/filter_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ void FilterManager::decodeHeaders(ActiveStreamDecoderFilter* filter, RequestHead
commonDecodePrefix(filter, FilterIterationStartState::AlwaysStartFromNext);
std::list<ActiveStreamDecoderFilterPtr>::iterator continue_data_entry = decoder_filters_.end();
bool terminal_filter_decoded_end_stream = false;
ASSERT(!state_.decoder_filter_chain_complete_ || entry == decoder_filters_.end() ||
(*entry)->end_stream_);

for (; entry != decoder_filters_.end(); entry++) {
ASSERT(!(state_.filter_call_state_ & FilterCallState::DecodeHeaders));
Expand Down Expand Up @@ -650,6 +652,8 @@ void FilterManager::decodeData(ActiveStreamDecoderFilter* filter, Buffer::Instan
std::list<ActiveStreamDecoderFilterPtr>::iterator entry =
commonDecodePrefix(filter, filter_iteration_start_state);
bool terminal_filter_decoded_end_stream = false;
ASSERT(!state_.decoder_filter_chain_complete_ || entry == decoder_filters_.end() ||
(*entry)->end_stream_);

for (; entry != decoder_filters_.end(); entry++) {
// If the filter pointed by entry has stopped for all frame types, return now.
Expand Down Expand Up @@ -799,6 +803,7 @@ void FilterManager::decodeTrailers(ActiveStreamDecoderFilter* filter, RequestTra
std::list<ActiveStreamDecoderFilterPtr>::iterator entry =
commonDecodePrefix(filter, FilterIterationStartState::CanStartFromCurrent);
bool terminal_filter_reached = false;
ASSERT(!state_.decoder_filter_chain_complete_ || entry == decoder_filters_.end());

for (; entry != decoder_filters_.end(); entry++) {
// If the filter pointed by entry has stopped for all frame type, return now.
Expand Down

0 comments on commit c02ac47

Please sign in to comment.