void FilterManager::addStreamDecoderFilterWorker(StreamDecoderFilterSharedPtr filter,
                                                 FilterMatchStateSharedPtr match_state,
                                                 bool dual_filter) {
  ActiveStreamDecoderFilterPtr wrapper(
      new ActiveStreamDecoderFilter(*this, filter, match_state, dual_filter));

  // If we're a dual handling filter, have the encoding wrapper be the only thing registering itself
  // as the handling filter.
  if (match_state) {
    match_state->filter_ = filter.get();
  }

  filter->setDecoderFilterCallbacks(*wrapper);
  // Note: configured decoder filters are appended to decoder_filters_.
  // This means that if filters are configured in the following order (assume all three filters are
  // both decoder/encoder filters):
  //   http_filters:
  //     - A
  //     - B
  //     - C
  // The decoder filter chain will iterate through filters A, B, C.
  LinkedList::moveIntoListBack(std::move(wrapper), decoder_filters_);
}
void FilterManager::addStreamDecoderFilterWorker(StreamDecoderFilterSharedPtr filter,
                                                 FilterMatchStateSharedPtr match_state,
                                                 bool dual_filter) {
  ActiveStreamDecoderFilterPtr wrapper(
      new ActiveStreamDecoderFilter(*this, filter, match_state, dual_filter));

   
   
  if (match_state) {
    match_state->filter_ = filter.get();
  }

  filter->setDecoderFilterCallbacks(*wrapper);
   
   
   
   
   
   
   
   
  LinkedList::moveIntoListBack(std::move(wrapper), decoder_filters_);
}