HeaderMap& ConnectionManagerImpl::ActiveStream::addEncodedTrailers() {
  // Trailers can only be added during the last data frame (i.e. end_stream = true).
  ASSERT(state_.filter_call_state_ & FilterCallState::LastDataFrame);

  // Trailers can only be added once.
  ASSERT(!response_trailers_);

  response_trailers_ = std::make_unique<HeaderMapImpl>();
  return *response_trailers_;
}
HeaderMap& ConnectionManagerImpl::ActiveStream::addEncodedTrailers() {
   
  ASSERT(state_.filter_call_state_ & FilterCallState::LastDataFrame);

   
  ASSERT(!response_trailers_);

  response_trailers_ = std::make_unique<HeaderMapImpl>();
  return *response_trailers_;
}