upstream_request_.parent_.callbacks()->sendLocalReply(code, body, modify_headers, grpc_status,
filter_manager_callbacks_ = std::make_unique<UpstreamRequestFilterManagerCallbacks>(*this);
*filter_manager_callbacks_, parent_.callbacks()->dispatcher(), UpstreamRequest::connection(),
created = filter_manager_->createFilterChain(defaultUpstreamHttpFilterChainFactory()).created();
Upstream::ClusterTimeoutBudgetStatsOptRef tb_stats = parent_.cluster()->timeoutBudgetStats();
req_resp_stats.upstream_rq_headers_size_.recordValue(parent_.downstreamHeaders()->byteSize());
// This is called by the FilterManager when all filters have processed 1xx headers. Forward them
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
void UpstreamRequest::decodeHeaders(Http::ResponseHeaderMapPtr&& headers, bool end_stream) {
ENVOY_STREAM_LOG(trace, "end_stream: {}, upstream response headers:\n{}", *parent_.callbacks(),
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
// We drop unsupported 1xx on the floor here. 101 upgrade headers need to be passed to the client
// We could in principle handle other headers here, but this might result in the double invocation
// This filtering is done early in upstream request, unlike 100 coalescing which is performed in
// the router filter, since the filtering only depends on the state of a single upstream, and we
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
ENVOY_STREAM_LOG(trace, "upstream response trailers:\n{}", *parent_.callbacks(), *trailers);
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
// In future it may be possible for upstream HTTP filters to delay this, or influence connection
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
upstream_log_flush_timer_->enableTimer(parent_.config().upstream_log_flush_interval_.value());
ScopeTrackerScopeState scope(&parent_.callbacks()->scope(), parent_.callbacks()->dispatcher());
upstreamTiming().upstream_handshake_complete_ = upstream_timing.upstream_handshake_complete_;
// This is because the onUpstreamHostSelected callback may need to access the ssl_connection_info
StreamInfo::StreamInfo::syncUpstreamAndDownstreamBytesMeter(parent_.callbacks()->streamInfo(),
if (address_provider.connectionID() && stream_info_.downstreamAddressProvider().connectionID()) {
UpstreamToDownstream& UpstreamRequest::upstreamToDownstream() { return *upstream_interface_; }