stats_gatherer_ = new QuicStatsGatherer(&filterManagerConnection()->dispatcher().timeSource());
if (Runtime::runtimeFeatureEnabled("envoy.restart_features.validate_http3_pseudo_headers") &&
void EnvoyQuicServerStream::encodeHeaders(const Http::ResponseHeaderMap& headers, bool end_stream) {
// From when the callback got scheduled till now, readDisable() might have blocked and unblocked
const bool headers_only = fin_received() && highest_received_byte_offset() == NumBytesConsumed();
ENVOY_STREAM_LOG(debug, "Headers_only: {}, end_stream: {}.", *this, headers_only, end_stream);
// If read has been disabled, QUIC should not deliver any more data upstream to increase the bytes
bool skip_decoding = (buffer->length() == 0 && !fin_read_and_no_trailers) || end_stream_decoded_;
ENVOY_STREAM_LOG(debug, "Received trailers: {}.", *this, received_trailers().DebugString());
// If both directions are closed but end stream hasn't been encoded yet, notify reset callbacks.
ENVOY_STREAM_LOG(debug, "sending reset code={}", *this, static_cast<int>(error.internal_code()));
filterManagerConnection()->incrementSentQuicResetStreamErrorStats(error, /*from_self*/ true,
Network::Connection* EnvoyQuicServerStream::connection() { return filterManagerConnection(); }
static const absl::flat_hash_set<std::string> known_pseudo_headers{":authority", ":protocol",
// Quic stream sends headers and trailers on the same stream, and buffers them in the same sending