diff --git a/src/core/ext/filters/client_channel/retry_filter.cc b/src/core/ext/filters/client_channel/retry_filter.cc index e8a6a467dd6..8d4740aa601 100644 --- a/src/core/ext/filters/client_channel/retry_filter.cc +++ b/src/core/ext/filters/client_channel/retry_filter.cc @@ -420,12 +420,17 @@ class RetryFilter::CallData { // BatchData.batch.payload points to this. grpc_transport_stream_op_batch_payload batch_payload_; // For send_initial_metadata. - grpc_linked_mdelem retry_attempts_metadata_; + // Note that we need to make a copy of the initial metadata for each + // call attempt instead of just referring to the copy in call_data, + // because filters in the subchannel stack may modify the metadata, + // so we need to start in a pristine state for each attempt of the call. + grpc_linked_mdelem* send_initial_metadata_storage_; grpc_metadata_batch send_initial_metadata_{calld_->arena_}; // For send_message. // TODO(roth): Restructure this to eliminate use of ManualConstructor. ManualConstructor send_message_; // For send_trailing_metadata. + grpc_linked_mdelem* send_trailing_metadata_storage_; grpc_metadata_batch send_trailing_metadata_{calld_->arena_}; // For intercepting recv_initial_metadata. grpc_metadata_batch recv_initial_metadata_{calld_->arena_}; @@ -568,6 +573,7 @@ class RetryFilter::CallData { // Cached data for retrying send ops. // send_initial_metadata bool seen_send_initial_metadata_ = false; + grpc_linked_mdelem* send_initial_metadata_storage_ = nullptr; grpc_metadata_batch send_initial_metadata_{arena_}; uint32_t send_initial_metadata_flags_; // TODO(roth): As part of implementing hedging, we'll probably need to @@ -593,6 +599,7 @@ class RetryFilter::CallData { absl::InlinedVector send_messages_; // send_trailing_metadata bool seen_send_trailing_metadata_ = false; + grpc_linked_mdelem* send_trailing_metadata_storage_ = nullptr; grpc_metadata_batch send_trailing_metadata_{arena_}; }; @@ -1902,8 +1909,14 @@ void RetryFilter::CallData::CallAttempt::BatchData:: // // If we've already completed one or more attempts, add the // grpc-retry-attempts header. + call_attempt_->send_initial_metadata_storage_ = + static_cast(calld->arena_->Alloc( + sizeof(grpc_linked_mdelem) * + (calld->send_initial_metadata_.non_deadline_count() + + (calld->num_attempts_completed_ > 0)))); grpc_metadata_batch_copy(&calld->send_initial_metadata_, - &call_attempt_->send_initial_metadata_); + &call_attempt_->send_initial_metadata_, + call_attempt_->send_initial_metadata_storage_); if (GPR_UNLIKELY(call_attempt_->send_initial_metadata_.legacy_index() ->named.grpc_previous_rpc_attempts != nullptr)) { call_attempt_->send_initial_metadata_.Remove( @@ -1915,8 +1928,9 @@ void RetryFilter::CallData::CallAttempt::BatchData:: *retry_count_strings[calld->num_attempts_completed_ - 1], nullptr); grpc_error_handle error = grpc_metadata_batch_add_tail( &call_attempt_->send_initial_metadata_, - &call_attempt_->retry_attempts_metadata_, retry_md, - GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS); + &call_attempt_->send_initial_metadata_storage_ + [calld->send_initial_metadata_.non_deadline_count()], + retry_md, GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS); if (GPR_UNLIKELY(error != GRPC_ERROR_NONE)) { gpr_log(GPR_ERROR, "error adding retry metadata: %s", grpc_error_std_string(error).c_str()); @@ -1958,8 +1972,13 @@ void RetryFilter::CallData::CallAttempt::BatchData:: // We need to make a copy of the metadata batch for each attempt, since // the filters in the subchannel stack may modify this batch, and we don't // want those modifications to be passed forward to subsequent attempts. + call_attempt_->send_trailing_metadata_storage_ = + static_cast(calld->arena_->Alloc( + sizeof(grpc_linked_mdelem) * + calld->send_trailing_metadata_.non_deadline_count())); grpc_metadata_batch_copy(&calld->send_trailing_metadata_, - &call_attempt_->send_trailing_metadata_); + &call_attempt_->send_trailing_metadata_, + call_attempt_->send_trailing_metadata_storage_); call_attempt_->started_send_trailing_metadata_ = true; batch_.send_trailing_metadata = true; batch_.payload->send_trailing_metadata.send_trailing_metadata = @@ -2272,9 +2291,14 @@ void RetryFilter::CallData::MaybeCacheSendOpsForBatch(PendingBatch* pending) { // Save a copy of metadata for send_initial_metadata ops. if (batch->send_initial_metadata) { seen_send_initial_metadata_ = true; + GPR_ASSERT(send_initial_metadata_storage_ == nullptr); grpc_metadata_batch* send_initial_metadata = batch->payload->send_initial_metadata.send_initial_metadata; - grpc_metadata_batch_copy(send_initial_metadata, &send_initial_metadata_); + send_initial_metadata_storage_ = static_cast( + arena_->Alloc(sizeof(grpc_linked_mdelem) * + send_initial_metadata->non_deadline_count())); + grpc_metadata_batch_copy(send_initial_metadata, &send_initial_metadata_, + send_initial_metadata_storage_); send_initial_metadata_flags_ = batch->payload->send_initial_metadata.send_initial_metadata_flags; peer_string_ = batch->payload->send_initial_metadata.peer_string; @@ -2288,9 +2312,14 @@ void RetryFilter::CallData::MaybeCacheSendOpsForBatch(PendingBatch* pending) { // Save metadata batch for send_trailing_metadata ops. if (batch->send_trailing_metadata) { seen_send_trailing_metadata_ = true; + GPR_ASSERT(send_trailing_metadata_storage_ == nullptr); grpc_metadata_batch* send_trailing_metadata = batch->payload->send_trailing_metadata.send_trailing_metadata; - grpc_metadata_batch_copy(send_trailing_metadata, &send_trailing_metadata_); + send_trailing_metadata_storage_ = static_cast( + arena_->Alloc(sizeof(grpc_linked_mdelem) * + send_trailing_metadata->non_deadline_count())); + grpc_metadata_batch_copy(send_trailing_metadata, &send_trailing_metadata_, + send_trailing_metadata_storage_); } } diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc index 5310cfdde90..5e948a36f1f 100644 --- a/src/core/ext/filters/http/client/http_client_filter.cc +++ b/src/core/ext/filters/http/client/http_client_filter.cc @@ -78,6 +78,7 @@ struct call_data { // State for handling send_initial_metadata ops. grpc_linked_mdelem method; grpc_linked_mdelem scheme; + grpc_linked_mdelem te_trailers; grpc_linked_mdelem content_type; grpc_linked_mdelem user_agent; // State for handling recv_initial_metadata ops. @@ -440,6 +441,9 @@ static void http_client_start_transport_stream_op_batch( remove_if_present( batch->payload->send_initial_metadata.send_initial_metadata, GRPC_BATCH_SCHEME); + remove_if_present( + batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_TE); remove_if_present( batch->payload->send_initial_metadata.send_initial_metadata, GRPC_BATCH_CONTENT_TYPE); @@ -457,8 +461,10 @@ static void http_client_start_transport_stream_op_batch( batch->payload->send_initial_metadata.send_initial_metadata, &calld->scheme, channeld->static_scheme, GRPC_BATCH_SCHEME); if (error != GRPC_ERROR_NONE) goto done; - batch->payload->send_initial_metadata.send_initial_metadata->Set( - grpc_core::TeMetadata(), grpc_core::TeMetadata::kTrailers); + error = grpc_metadata_batch_add_tail( + batch->payload->send_initial_metadata.send_initial_metadata, + &calld->te_trailers, GRPC_MDELEM_TE_TRAILERS, GRPC_BATCH_TE); + if (error != GRPC_ERROR_NONE) goto done; error = grpc_metadata_batch_add_tail( batch->payload->send_initial_metadata.send_initial_metadata, &calld->content_type, GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC, diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index 0a2108d0051..f4092316ba1 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -193,17 +193,20 @@ static grpc_error_handle hs_filter_incoming_metadata(grpc_call_element* elem, GRPC_ERROR_STR_KEY, ":method")); } - auto te = b->Take(grpc_core::TeMetadata()); - if (te == grpc_core::TeMetadata::kTrailers) { - // Do nothing, ok. - } else if (!te.has_value()) { + if (b->legacy_index()->named.te != nullptr) { + if (!grpc_mdelem_static_value_eq(b->legacy_index()->named.te->md, + GRPC_MDELEM_TE_TRAILERS)) { + hs_add_error(error_name, &error, + grpc_attach_md_to_error( + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Bad header"), + b->legacy_index()->named.te->md)); + } + b->Remove(GRPC_BATCH_TE); + } else { hs_add_error(error_name, &error, grpc_error_set_str( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Missing header"), GRPC_ERROR_STR_KEY, "te")); - } else { - hs_add_error(error_name, &error, - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Bad te header")); } if (b->legacy_index()->named.scheme != nullptr) { diff --git a/src/core/ext/transport/binder/transport/binder_transport.cc b/src/core/ext/transport/binder/transport/binder_transport.cc index 6cd5933e3f3..dc9510f45b5 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.cc +++ b/src/core/ext/transport/binder/transport/binder_transport.cc @@ -118,11 +118,21 @@ static void set_pollset_set(grpc_transport*, grpc_stream*, grpc_pollset_set*) { gpr_log(GPR_INFO, __func__); } -static void AssignMetadata(grpc_metadata_batch* mb, +static void AssignMetadata(grpc_metadata_batch* mb, grpc_core::Arena* arena, const grpc_binder::Metadata& md) { mb->Clear(); for (auto& p : md) { - mb->Append(p.first, grpc_slice_from_cpp_string(p.second)); + grpc_linked_mdelem* glm = static_cast( + arena->Alloc(sizeof(grpc_linked_mdelem))); + memset(glm, 0, sizeof(grpc_linked_mdelem)); + grpc_slice key = grpc_slice_from_cpp_string(p.first); + grpc_slice value = grpc_slice_from_cpp_string(p.second); + glm->md = grpc_mdelem_from_slices(grpc_slice_intern(key), + grpc_slice_intern(value)); + // Unref here to prevent memory leak + grpc_slice_unref_internal(key); + grpc_slice_unref_internal(value); + GPR_ASSERT(mb->LinkTail(glm) == GRPC_ERROR_NONE); } } @@ -200,7 +210,8 @@ static void recv_initial_metadata_locked(void* arg, "Missing :authority or :path in initial metadata"); } } - AssignMetadata(gbs->recv_initial_metadata, *args->initial_metadata); + AssignMetadata(gbs->recv_initial_metadata, gbs->arena, + *args->initial_metadata); return GRPC_ERROR_NONE; }(); @@ -282,7 +293,8 @@ static void recv_trailing_metadata_locked(void* arg, return GRPC_ERROR_CANCELLED; } } else { - AssignMetadata(gbs->recv_trailing_metadata, *args->trailing_metadata); + AssignMetadata(gbs->recv_trailing_metadata, gbs->arena, + *args->trailing_metadata); // Append status to metadata // TODO(b/192208695): See if we can avoid to manually put status // code into the header diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index 5dfd11d9968..965d88dda70 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -265,22 +265,6 @@ class StringValue { VarintWriter<1> len_val_; }; -class NonBinaryStringValue { - public: - explicit NonBinaryStringValue(const grpc_slice& value) - : value_(value), len_val_(GRPC_SLICE_LENGTH(value)) {} - - size_t prefix_length() const { return len_val_.length(); } - - void WritePrefix(uint8_t* prefix_data) { len_val_.Write(0x00, prefix_data); } - - const grpc_slice& data() { return value_; } - - private: - grpc_slice value_; - VarintWriter<1> len_val_; -}; - class StringKey { public: explicit StringKey(grpc_slice key) @@ -333,18 +317,6 @@ void HPackCompressor::Framer::EmitLitHdrWithStringKeyIncIdx(grpc_mdelem elem) { Add(emit.data()); } -void HPackCompressor::Framer::EmitLitHdrWithNonBinaryStringKeyIncIdx( - const grpc_slice& key_slice, const grpc_slice& value_slice) { - GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V(); - GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED(); - StringKey key(key_slice); - key.WritePrefix(0x40, AddTiny(key.prefix_length())); - Add(grpc_slice_ref_internal(key.key())); - NonBinaryStringValue emit(value_slice); - emit.WritePrefix(AddTiny(emit.prefix_length())); - Add(grpc_slice_ref_internal(emit.data())); -} - void HPackCompressor::Framer::EmitLitHdrWithStringKeyNotIdx(grpc_mdelem elem) { GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V(); GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED(); @@ -476,17 +448,6 @@ void HPackCompressor::Framer::EncodeDynamic(grpc_mdelem elem) { } } -void HPackCompressor::Framer::Encode(TeMetadata, TeMetadata::ValueType value) { - GPR_ASSERT(value == TeMetadata::ValueType::kTrailers); - if (compressor_->table_.ConvertableToDynamicIndex(compressor_->te_index_)) { - EmitIndexed(compressor_->table_.DynamicIndex(compressor_->te_index_)); - } else { - compressor_->te_index_ = compressor_->table_.AllocateIndex( - 2 /* te */ + 8 /* trailers */ + hpack_constants::kEntryOverhead); - EmitLitHdrWithNonBinaryStringKeyIncIdx(GRPC_MDSTR_TE, GRPC_MDSTR_TRAILERS); - } -} - void HPackCompressor::Framer::Encode(GrpcTimeoutMetadata, grpc_millis deadline) { char timeout_str[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE]; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 547da351baf..e7eb982c974 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -118,7 +118,6 @@ class HPackCompressor { void Encode(grpc_mdelem md); void Encode(GrpcTimeoutMetadata, grpc_millis deadline); - void Encode(TeMetadata, TeMetadata::ValueType value); private: struct FramePrefix { @@ -141,8 +140,6 @@ class HPackCompressor { void EmitLitHdrIncIdx(uint32_t key_index, grpc_mdelem elem); void EmitLitHdrNotIdx(uint32_t key_index, grpc_mdelem elem); void EmitLitHdrWithStringKeyIncIdx(grpc_mdelem elem); - void EmitLitHdrWithNonBinaryStringKeyIncIdx(const grpc_slice& key_slice, - const grpc_slice& value_slice); void EmitLitHdrWithStringKeyNotIdx(grpc_mdelem elem); size_t CurrentFrameSize() const; @@ -190,7 +187,7 @@ class HPackCompressor { // a new literal should be added to the compression table or not. // They track a single integer that counts how often a particular value has // been seen. When that count reaches max (255), all values are halved. - PopularityCount filter_elems_; + grpc_core::PopularityCount filter_elems_; class KeyElem { public: @@ -267,9 +264,8 @@ class HPackCompressor { // entry tables for keys & elems: these tables track values that have been // seen and *may* be in the decompressor table - HPackEncoderIndex elem_index_; - HPackEncoderIndex key_index_; - uint32_t te_index_ = 0; + grpc_core::HPackEncoderIndex elem_index_; + grpc_core::HPackEncoderIndex key_index_; }; } // namespace grpc_core diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 4f1316960e0..79a98a59d97 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -408,8 +408,10 @@ static void convert_cronet_array_to_metadata( for (size_t i = 0; i < header_array->count; i++) { CRONET_LOG(GPR_DEBUG, "header key=%s, value=%s", header_array->headers[i].key, header_array->headers[i].value); + grpc_slice key = grpc_slice_intern( + grpc_slice_from_static_string(header_array->headers[i].key)); grpc_slice value; - if (absl::EndsWith(header_array->headers[i].key, "-bin")) { + if (grpc_is_refcounted_slice_binary_header(key)) { value = grpc_slice_from_static_string(header_array->headers[i].value); value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( value, grpc_chttp2_base64_infer_length_after_decode(value))); @@ -417,7 +419,8 @@ static void convert_cronet_array_to_metadata( value = grpc_slice_intern( grpc_slice_from_static_string(header_array->headers[i].value)); } - mds->Append(header_array->headers[i].key, value); + GRPC_LOG_IF_ERROR("convert_cronet_array_to_metadata", + mds->Append(grpc_mdelem_from_slices(key, value))); } } @@ -692,39 +695,29 @@ static void create_grpc_frame(grpc_slice_buffer* write_slice_buffer, } } -namespace { -class CronetMetadataEncoder { - public: - explicit CronetMetadataEncoder(bidirectional_stream_header** pp_headers, - size_t* p_count, const char* host, - size_t capacity, const char** method, - std::string* url) - : host_(host), - capacity_(capacity), - count_(*p_count), - headers_(*pp_headers), - method_(method), - url_(url) { - count_ = 0; - headers_ = static_cast( - gpr_malloc(sizeof(bidirectional_stream_header) * capacity_)); - } - - ~CronetMetadataEncoder() { gpr_free(headers_); } - - CronetMetadataEncoder(const CronetMetadataEncoder&) = delete; - CronetMetadataEncoder& operator=(const CronetMetadataEncoder&) = delete; - - template - void Encode(T, V value) { - auto value_slice = T::Encode(value); - auto key_slice = grpc_slice_from_static_string(T::key()); - auto mdelem = grpc_mdelem_from_slices(key_slice, value_slice); - Encode(mdelem); - GRPC_MDELEM_UNREF(mdelem); - } - - void Encode(grpc_mdelem mdelem) { +/* + Convert metadata in a format that Cronet can consume +*/ +static void convert_metadata_to_cronet_headers( + grpc_metadata_batch* metadata, const char* host, std::string* pp_url, + bidirectional_stream_header** pp_headers, size_t* p_num_headers, + const char** method) { + /* Get number of header fields */ + size_t num_headers_available = metadata->count(); + /* Allocate enough memory. It is freed in the on_stream_ready callback + */ + bidirectional_stream_header* headers = + static_cast(gpr_malloc( + sizeof(bidirectional_stream_header) * num_headers_available)); + *pp_headers = headers; + + /* Walk the linked list again, this time copying the header fields. + s->num_headers can be less than num_headers_available, as some headers + are not used for cronet. + TODO (makdharma): Eliminate need to traverse the LL second time for perf. + */ + size_t num_headers = 0; + metadata->ForEach([&](grpc_mdelem mdelem) { char* key = grpc_slice_to_c_string(GRPC_MDKEY(mdelem)); char* value; if (grpc_is_binary_header_internal(GRPC_MDKEY(mdelem))) { @@ -744,10 +737,10 @@ class CronetMetadataEncoder { } if (grpc_slice_eq_static_interned(GRPC_MDKEY(mdelem), GRPC_MDSTR_METHOD)) { if (grpc_slice_eq_static_interned(GRPC_MDVALUE(mdelem), GRPC_MDSTR_PUT)) { - *method_ = "PUT"; + *method = "PUT"; } else { /* POST method in default*/ - *method_ = "POST"; + *method = "POST"; } gpr_free(key); gpr_free(value); @@ -755,38 +748,29 @@ class CronetMetadataEncoder { } if (grpc_slice_eq_static_interned(GRPC_MDKEY(mdelem), GRPC_MDSTR_PATH)) { /* Create URL by appending :path value to the hostname */ - *url_ = absl::StrCat("https://", host_, value); + *pp_url = absl::StrCat("https://", host, value); gpr_free(key); gpr_free(value); return; } CRONET_LOG(GPR_DEBUG, "header %s = %s", key, value); - GPR_ASSERT(count_ < capacity_); - headers_[count_].key = key; - headers_[count_].value = value; - ++count_; + headers[num_headers].key = key; + headers[num_headers].value = value; + num_headers++; + }); + if (metadata->deadline() != GRPC_MILLIS_INF_FUTURE) { + char* key = grpc_slice_to_c_string(GRPC_MDSTR_GRPC_TIMEOUT); + char* value = + static_cast(gpr_malloc(GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE)); + grpc_http2_encode_timeout( + metadata->deadline() - grpc_core::ExecCtx::Get()->Now(), value); + headers[num_headers].key = key; + headers[num_headers].value = value; + + num_headers++; } - private: - const char* host_; - size_t capacity_; - size_t& count_; - bidirectional_stream_header*& headers_; - const char** method_; - std::string* url_; -}; -} // namespace - -/* - Convert metadata in a format that Cronet can consume -*/ -static void convert_metadata_to_cronet_headers( - grpc_metadata_batch* metadata, const char* host, std::string* pp_url, - bidirectional_stream_header** pp_headers, size_t* p_num_headers, - const char** method) { - CronetMetadataEncoder encoder(pp_headers, p_num_headers, host, - metadata->count(), method, pp_url); - metadata->Encode(&encoder); + *p_num_headers = num_headers; } static void parse_grpc_header(const uint8_t* data, int* length, diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 9215f32eabd..db678b8d029 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -57,9 +57,10 @@ void maybe_process_ops_locked(inproc_stream* s, grpc_error_handle error); void op_state_machine_locked(inproc_stream* s, grpc_error_handle error); void log_metadata(const grpc_metadata_batch* md_batch, bool is_client, bool is_initial); -void fill_in_metadata(inproc_stream* s, const grpc_metadata_batch* metadata, - uint32_t flags, grpc_metadata_batch* out_md, - uint32_t* outflags, bool* markfilled); +grpc_error_handle fill_in_metadata(inproc_stream* s, + const grpc_metadata_batch* metadata, + uint32_t flags, grpc_metadata_batch* out_md, + uint32_t* outflags, bool* markfilled); struct shared_mu { shared_mu() { @@ -289,9 +290,10 @@ void log_metadata(const grpc_metadata_batch* md_batch, bool is_client, }); } -void fill_in_metadata(inproc_stream* s, const grpc_metadata_batch* metadata, - uint32_t flags, grpc_metadata_batch* out_md, - uint32_t* outflags, bool* markfilled) { +grpc_error_handle fill_in_metadata(inproc_stream* s, + const grpc_metadata_batch* metadata, + uint32_t flags, grpc_metadata_batch* out_md, + uint32_t* outflags, bool* markfilled) { if (GRPC_TRACE_FLAG_ENABLED(grpc_inproc_trace)) { log_metadata(metadata, s->t->is_client, outflags != nullptr); } @@ -302,7 +304,17 @@ void fill_in_metadata(inproc_stream* s, const grpc_metadata_batch* metadata, if (markfilled != nullptr) { *markfilled = true; } - grpc_metadata_batch_copy(metadata, out_md); + grpc_error_handle error = GRPC_ERROR_NONE; + metadata->ForEach([&](grpc_mdelem md) { + if (error != GRPC_ERROR_NONE) return; + grpc_linked_mdelem* nelem = + static_cast(s->arena->Alloc(sizeof(*nelem))); + nelem->md = grpc_mdelem_from_slices(grpc_slice_intern(GRPC_MDKEY(md)), + grpc_slice_intern(GRPC_MDVALUE(md))); + + error = out_md->LinkTail(nelem); + }); + return error; } int init_stream(grpc_transport* gt, grpc_stream* gs, @@ -678,7 +690,7 @@ void op_state_machine_locked(inproc_stream* s, grpc_error_handle error) { if (s->to_read_initial_md_filled) { s->initial_md_recvd = true; - fill_in_metadata( + new_err = fill_in_metadata( s, &s->to_read_initial_md, s->to_read_initial_md_flags, s->recv_initial_md_op->payload->recv_initial_metadata .recv_initial_metadata, @@ -697,15 +709,26 @@ void op_state_machine_locked(inproc_stream* s, grpc_error_handle error) { } s->to_read_initial_md.Clear(); s->to_read_initial_md_filled = false; + INPROC_LOG(GPR_INFO, + "op_state_machine %p scheduling initial-metadata-ready %s", s, + grpc_error_std_string(new_err).c_str()); grpc_core::ExecCtx::Run( DEBUG_LOCATION, s->recv_initial_md_op->payload->recv_initial_metadata .recv_initial_metadata_ready, - GRPC_ERROR_NONE); + GRPC_ERROR_REF(new_err)); complete_if_batch_end_locked( - s, GRPC_ERROR_NONE, s->recv_initial_md_op, + s, new_err, s->recv_initial_md_op, "op_state_machine scheduling recv-initial-metadata-on-complete"); s->recv_initial_md_op = nullptr; + + if (new_err != GRPC_ERROR_NONE) { + INPROC_LOG(GPR_INFO, + "op_state_machine %p scheduling on_complete errors2 %s", s, + grpc_error_std_string(new_err).c_str()); + fail_helper_locked(s, GRPC_ERROR_REF(new_err)); + goto done; + } } } if (s->recv_message_op) { @@ -763,10 +786,11 @@ void op_state_machine_locked(inproc_stream* s, grpc_error_handle error) { if (s->recv_trailing_md_op != nullptr) { // We wanted trailing metadata and we got it s->trailing_md_recvd = true; - fill_in_metadata(s, &s->to_read_trailing_md, 0, - s->recv_trailing_md_op->payload->recv_trailing_metadata - .recv_trailing_metadata, - nullptr, nullptr); + new_err = + fill_in_metadata(s, &s->to_read_trailing_md, 0, + s->recv_trailing_md_op->payload + ->recv_trailing_metadata.recv_trailing_metadata, + nullptr, nullptr); s->to_read_trailing_md.Clear(); s->to_read_trailing_md_filled = false; @@ -776,16 +800,24 @@ void op_state_machine_locked(inproc_stream* s, grpc_error_handle error) { // (If the server hasn't already sent its trailing md, it doesn't have // a final status, so don't mark this op complete) if (s->t->is_client || s->trailing_md_sent) { + INPROC_LOG(GPR_INFO, + "op_state_machine %p scheduling trailing-md-on-complete %s", + s, grpc_error_std_string(new_err).c_str()); grpc_core::ExecCtx::Run( DEBUG_LOCATION, s->recv_trailing_md_op->payload->recv_trailing_metadata .recv_trailing_metadata_ready, - GRPC_ERROR_NONE); + GRPC_ERROR_REF(new_err)); grpc_core::ExecCtx::Run(DEBUG_LOCATION, s->recv_trailing_md_op->on_complete, - GRPC_ERROR_NONE); + GRPC_ERROR_REF(new_err)); s->recv_trailing_md_op = nullptr; needs_close = s->trailing_md_sent; + } else { + INPROC_LOG(GPR_INFO, + "op_state_machine %p server needs to delay handling " + "trailing-md-on-complete %s", + s, grpc_error_std_string(new_err).c_str()); } } else if (!s->trailing_md_recvd) { INPROC_LOG( diff --git a/src/core/lib/slice/static_slice.cc b/src/core/lib/slice/static_slice.cc index 40681b11348..c96f53895b8 100644 --- a/src/core/lib/slice/static_slice.cc +++ b/src/core/lib/slice/static_slice.cc @@ -32,97 +32,97 @@ namespace grpc_core { const uint8_t g_static_metadata_bytes[] = { 58, 112, 97, 116, 104, 58, 109, 101, 116, 104, 111, 100, 58, 115, 116, 97, 116, 117, 115, 58, 97, 117, 116, 104, 111, 114, 105, 116, 121, 58, - 115, 99, 104, 101, 109, 101, 103, 114, 112, 99, 45, 109, 101, 115, 115, - 97, 103, 101, 103, 114, 112, 99, 45, 115, 116, 97, 116, 117, 115, 103, - 114, 112, 99, 45, 112, 97, 121, 108, 111, 97, 100, 45, 98, 105, 110, - 103, 114, 112, 99, 45, 101, 110, 99, 111, 100, 105, 110, 103, 103, 114, - 112, 99, 45, 97, 99, 99, 101, 112, 116, 45, 101, 110, 99, 111, 100, - 105, 110, 103, 103, 114, 112, 99, 45, 115, 101, 114, 118, 101, 114, 45, - 115, 116, 97, 116, 115, 45, 98, 105, 110, 103, 114, 112, 99, 45, 116, - 97, 103, 115, 45, 98, 105, 110, 103, 114, 112, 99, 45, 116, 114, 97, - 99, 101, 45, 98, 105, 110, 99, 111, 110, 116, 101, 110, 116, 45, 116, - 121, 112, 101, 99, 111, 110, 116, 101, 110, 116, 45, 101, 110, 99, 111, - 100, 105, 110, 103, 97, 99, 99, 101, 112, 116, 45, 101, 110, 99, 111, - 100, 105, 110, 103, 103, 114, 112, 99, 45, 105, 110, 116, 101, 114, 110, - 97, 108, 45, 101, 110, 99, 111, 100, 105, 110, 103, 45, 114, 101, 113, - 117, 101, 115, 116, 103, 114, 112, 99, 45, 105, 110, 116, 101, 114, 110, - 97, 108, 45, 115, 116, 114, 101, 97, 109, 45, 101, 110, 99, 111, 100, - 105, 110, 103, 45, 114, 101, 113, 117, 101, 115, 116, 117, 115, 101, 114, - 45, 97, 103, 101, 110, 116, 104, 111, 115, 116, 103, 114, 112, 99, 45, - 112, 114, 101, 118, 105, 111, 117, 115, 45, 114, 112, 99, 45, 97, 116, - 116, 101, 109, 112, 116, 115, 103, 114, 112, 99, 45, 114, 101, 116, 114, - 121, 45, 112, 117, 115, 104, 98, 97, 99, 107, 45, 109, 115, 120, 45, - 101, 110, 100, 112, 111, 105, 110, 116, 45, 108, 111, 97, 100, 45, 109, - 101, 116, 114, 105, 99, 115, 45, 98, 105, 110, 103, 114, 112, 99, 45, - 116, 105, 109, 101, 111, 117, 116, 49, 50, 51, 52, 103, 114, 112, 99, - 46, 119, 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97, 100, 121, - 103, 114, 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103, 114, 112, - 99, 46, 109, 97, 120, 95, 114, 101, 113, 117, 101, 115, 116, 95, 109, - 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 103, 114, 112, - 99, 46, 109, 97, 120, 95, 114, 101, 115, 112, 111, 110, 115, 101, 95, - 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 47, 103, - 114, 112, 99, 46, 108, 98, 46, 118, 49, 46, 76, 111, 97, 100, 66, - 97, 108, 97, 110, 99, 101, 114, 47, 66, 97, 108, 97, 110, 99, 101, - 76, 111, 97, 100, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, - 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, 116, 97, 116, 115, 46, - 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, 111, 114, 116, 105, 110, - 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, - 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 101, 110, 118, 111, 121, - 46, 115, 101, 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, - 116, 97, 116, 115, 46, 118, 51, 46, 76, 111, 97, 100, 82, 101, 112, - 111, 114, 116, 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, - 116, 114, 101, 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, - 103, 114, 112, 99, 46, 104, 101, 97, 108, 116, 104, 46, 118, 49, 46, - 72, 101, 97, 108, 116, 104, 47, 87, 97, 116, 99, 104, 47, 101, 110, - 118, 111, 121, 46, 115, 101, 114, 118, 105, 99, 101, 46, 100, 105, 115, - 99, 111, 118, 101, 114, 121, 46, 118, 50, 46, 65, 103, 103, 114, 101, - 103, 97, 116, 101, 100, 68, 105, 115, 99, 111, 118, 101, 114, 121, 83, - 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 65, 103, - 103, 114, 101, 103, 97, 116, 101, 100, 82, 101, 115, 111, 117, 114, 99, - 101, 115, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, 105, 99, - 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, 51, 46, - 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, 99, 111, - 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, - 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 82, 101, - 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, 97, 116, 101, 103, - 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, 105, 112, 116, - 101, 116, 114, 97, 105, 108, 101, 114, 115, 71, 69, 84, 80, 79, 83, - 84, 47, 47, 105, 110, 100, 101, 120, 46, 104, 116, 109, 108, 104, 116, - 116, 112, 104, 116, 116, 112, 115, 50, 48, 48, 50, 48, 52, 50, 48, - 54, 51, 48, 52, 52, 48, 48, 52, 48, 52, 53, 48, 48, 97, 99, - 99, 101, 112, 116, 45, 99, 104, 97, 114, 115, 101, 116, 103, 122, 105, - 112, 44, 32, 100, 101, 102, 108, 97, 116, 101, 97, 99, 99, 101, 112, - 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 97, 99, 99, 101, 112, - 116, 45, 114, 97, 110, 103, 101, 115, 97, 99, 99, 101, 112, 116, 97, - 99, 99, 101, 115, 115, 45, 99, 111, 110, 116, 114, 111, 108, 45, 97, - 108, 108, 111, 119, 45, 111, 114, 105, 103, 105, 110, 97, 103, 101, 97, - 108, 108, 111, 119, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, - 111, 110, 99, 97, 99, 104, 101, 45, 99, 111, 110, 116, 114, 111, 108, - 99, 111, 110, 116, 101, 110, 116, 45, 100, 105, 115, 112, 111, 115, 105, - 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45, 108, 97, 110, - 103, 117, 97, 103, 101, 99, 111, 110, 116, 101, 110, 116, 45, 108, 101, - 110, 103, 116, 104, 99, 111, 110, 116, 101, 110, 116, 45, 108, 111, 99, - 97, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45, 114, 97, - 110, 103, 101, 99, 111, 111, 107, 105, 101, 100, 97, 116, 101, 101, 116, - 97, 103, 101, 120, 112, 101, 99, 116, 101, 120, 112, 105, 114, 101, 115, - 102, 114, 111, 109, 105, 102, 45, 109, 97, 116, 99, 104, 105, 102, 45, - 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 105, - 102, 45, 110, 111, 110, 101, 45, 109, 97, 116, 99, 104, 105, 102, 45, - 114, 97, 110, 103, 101, 105, 102, 45, 117, 110, 109, 111, 100, 105, 102, - 105, 101, 100, 45, 115, 105, 110, 99, 101, 108, 97, 115, 116, 45, 109, - 111, 100, 105, 102, 105, 101, 100, 108, 105, 110, 107, 108, 111, 99, 97, - 116, 105, 111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, 100, - 115, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116, 105, - 99, 97, 116, 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 111, - 114, 105, 122, 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114, 101, - 102, 101, 114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, 116, - 114, 121, 45, 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114, 115, - 101, 116, 45, 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99, 116, - 45, 116, 114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, 117, - 114, 105, 116, 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, 110, - 99, 111, 100, 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119, 119, - 119, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 48, - 105, 100, 101, 110, 116, 105, 116, 121, 97, 112, 112, 108, 105, 99, 97, + 115, 99, 104, 101, 109, 101, 116, 101, 103, 114, 112, 99, 45, 109, 101, + 115, 115, 97, 103, 101, 103, 114, 112, 99, 45, 115, 116, 97, 116, 117, + 115, 103, 114, 112, 99, 45, 112, 97, 121, 108, 111, 97, 100, 45, 98, + 105, 110, 103, 114, 112, 99, 45, 101, 110, 99, 111, 100, 105, 110, 103, + 103, 114, 112, 99, 45, 97, 99, 99, 101, 112, 116, 45, 101, 110, 99, + 111, 100, 105, 110, 103, 103, 114, 112, 99, 45, 115, 101, 114, 118, 101, + 114, 45, 115, 116, 97, 116, 115, 45, 98, 105, 110, 103, 114, 112, 99, + 45, 116, 97, 103, 115, 45, 98, 105, 110, 103, 114, 112, 99, 45, 116, + 114, 97, 99, 101, 45, 98, 105, 110, 99, 111, 110, 116, 101, 110, 116, + 45, 116, 121, 112, 101, 99, 111, 110, 116, 101, 110, 116, 45, 101, 110, + 99, 111, 100, 105, 110, 103, 97, 99, 99, 101, 112, 116, 45, 101, 110, + 99, 111, 100, 105, 110, 103, 103, 114, 112, 99, 45, 105, 110, 116, 101, + 114, 110, 97, 108, 45, 101, 110, 99, 111, 100, 105, 110, 103, 45, 114, + 101, 113, 117, 101, 115, 116, 103, 114, 112, 99, 45, 105, 110, 116, 101, + 114, 110, 97, 108, 45, 115, 116, 114, 101, 97, 109, 45, 101, 110, 99, + 111, 100, 105, 110, 103, 45, 114, 101, 113, 117, 101, 115, 116, 117, 115, + 101, 114, 45, 97, 103, 101, 110, 116, 104, 111, 115, 116, 103, 114, 112, + 99, 45, 112, 114, 101, 118, 105, 111, 117, 115, 45, 114, 112, 99, 45, + 97, 116, 116, 101, 109, 112, 116, 115, 103, 114, 112, 99, 45, 114, 101, + 116, 114, 121, 45, 112, 117, 115, 104, 98, 97, 99, 107, 45, 109, 115, + 120, 45, 101, 110, 100, 112, 111, 105, 110, 116, 45, 108, 111, 97, 100, + 45, 109, 101, 116, 114, 105, 99, 115, 45, 98, 105, 110, 103, 114, 112, + 99, 45, 116, 105, 109, 101, 111, 117, 116, 49, 50, 51, 52, 103, 114, + 112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97, + 100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103, + 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, 117, 101, 115, 116, + 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 103, + 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, 112, 111, 110, 115, + 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, + 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, 46, 76, 111, 97, + 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, 97, 108, 97, 110, + 99, 101, 76, 111, 97, 100, 47, 101, 110, 118, 111, 121, 46, 115, 101, + 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, 116, 97, 116, + 115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, 111, 114, 116, + 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, + 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 101, 110, 118, + 111, 121, 46, 115, 101, 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, + 95, 115, 116, 97, 116, 115, 46, 118, 51, 46, 76, 111, 97, 100, 82, + 101, 112, 111, 114, 116, 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, + 47, 83, 116, 114, 101, 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, + 115, 47, 103, 114, 112, 99, 46, 104, 101, 97, 108, 116, 104, 46, 118, + 49, 46, 72, 101, 97, 108, 116, 104, 47, 87, 97, 116, 99, 104, 47, + 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, 105, 99, 101, 46, 100, + 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, 50, 46, 65, 103, 103, + 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, 99, 111, 118, 101, 114, + 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, + 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 82, 101, 115, 111, 117, + 114, 99, 101, 115, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, + 105, 99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, + 51, 46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, + 99, 111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, + 116, 114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, + 82, 101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, 97, 116, + 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, 105, + 112, 71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100, 101, 120, + 46, 104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112, 115, 50, + 48, 48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 52, + 48, 52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, + 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, + 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, + 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, + 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, + 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, + 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, + 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, + 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, + 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, + 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, + 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, + 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, + 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, + 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, + 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, + 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, + 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, + 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, + 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, + 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, + 105, 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, + 102, 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, + 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, + 121, 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, + 114, 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, + 114, 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, + 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, + 101, 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, + 114, 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, + 115, 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, + 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, + 116, 105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105, 116, 121, + 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99, 80, 85, 84, 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, @@ -211,293 +211,293 @@ const StaticMetadataSlice &g_static_metadata_slice_refcounts[4].base, 7, g_static_metadata_bytes + 29), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[5].base, 12, + &g_static_metadata_slice_refcounts[5].base, 2, g_static_metadata_bytes + 36), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[6].base, 11, - g_static_metadata_bytes + 48), + &g_static_metadata_slice_refcounts[6].base, 12, + g_static_metadata_bytes + 38), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[7].base, 16, - g_static_metadata_bytes + 59), + &g_static_metadata_slice_refcounts[7].base, 11, + g_static_metadata_bytes + 50), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[8].base, 13, - g_static_metadata_bytes + 75), + &g_static_metadata_slice_refcounts[8].base, 16, + g_static_metadata_bytes + 61), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[9].base, 13, + g_static_metadata_bytes + 77), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[10].base, 21, - g_static_metadata_bytes + 108), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[11].base, 13, - g_static_metadata_bytes + 129), + &g_static_metadata_slice_refcounts[11].base, 21, + g_static_metadata_bytes + 110), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[12].base, 14, - g_static_metadata_bytes + 142), + &g_static_metadata_slice_refcounts[12].base, 13, + g_static_metadata_bytes + 131), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[13].base, 12, - g_static_metadata_bytes + 156), + &g_static_metadata_slice_refcounts[13].base, 14, + g_static_metadata_bytes + 144), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[14].base, 16, - g_static_metadata_bytes + 168), + &g_static_metadata_slice_refcounts[14].base, 12, + g_static_metadata_bytes + 158), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), + &g_static_metadata_slice_refcounts[15].base, 16, + g_static_metadata_bytes + 170), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[16].base, 30, - g_static_metadata_bytes + 199), + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[17].base, 37, - g_static_metadata_bytes + 229), + &g_static_metadata_slice_refcounts[17].base, 30, + g_static_metadata_bytes + 201), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[18].base, 10, - g_static_metadata_bytes + 266), + &g_static_metadata_slice_refcounts[18].base, 37, + g_static_metadata_bytes + 231), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[19].base, 4, - g_static_metadata_bytes + 276), + &g_static_metadata_slice_refcounts[19].base, 10, + g_static_metadata_bytes + 268), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[20].base, 26, - g_static_metadata_bytes + 280), + &g_static_metadata_slice_refcounts[20].base, 4, + g_static_metadata_bytes + 278), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[21].base, 22, - g_static_metadata_bytes + 306), + &g_static_metadata_slice_refcounts[21].base, 26, + g_static_metadata_bytes + 282), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[22].base, 27, - g_static_metadata_bytes + 328), + &g_static_metadata_slice_refcounts[22].base, 22, + g_static_metadata_bytes + 308), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[23].base, 12, - g_static_metadata_bytes + 355), + &g_static_metadata_slice_refcounts[23].base, 27, + g_static_metadata_bytes + 330), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[24].base, 1, - g_static_metadata_bytes + 367), + &g_static_metadata_slice_refcounts[24].base, 12, + g_static_metadata_bytes + 357), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[25].base, 1, - g_static_metadata_bytes + 368), - grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[26].base, 1, g_static_metadata_bytes + 369), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[27].base, 1, + &g_static_metadata_slice_refcounts[26].base, 1, g_static_metadata_bytes + 370), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, + &g_static_metadata_slice_refcounts[27].base, 1, g_static_metadata_bytes + 371), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[29].base, 19, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[28].base, 1, + g_static_metadata_bytes + 372), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[30].base, 12, - g_static_metadata_bytes + 390), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[31].base, 30, - g_static_metadata_bytes + 402), + &g_static_metadata_slice_refcounts[30].base, 19, + g_static_metadata_bytes + 373), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[32].base, 31, - g_static_metadata_bytes + 432), + &g_static_metadata_slice_refcounts[31].base, 12, + g_static_metadata_bytes + 392), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[33].base, 36, - g_static_metadata_bytes + 463), + &g_static_metadata_slice_refcounts[32].base, 30, + g_static_metadata_bytes + 404), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[34].base, 65, - g_static_metadata_bytes + 499), + &g_static_metadata_slice_refcounts[33].base, 31, + g_static_metadata_bytes + 434), + grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[34].base, 36, + g_static_metadata_bytes + 465), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[35].base, 65, - g_static_metadata_bytes + 564), + g_static_metadata_bytes + 501), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[36].base, 28, - g_static_metadata_bytes + 629), + &g_static_metadata_slice_refcounts[36].base, 65, + g_static_metadata_bytes + 566), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[37].base, 80, - g_static_metadata_bytes + 657), + &g_static_metadata_slice_refcounts[37].base, 28, + g_static_metadata_bytes + 631), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[38].base, 80, - g_static_metadata_bytes + 737), + g_static_metadata_bytes + 659), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[39].base, 7, - g_static_metadata_bytes + 817), + &g_static_metadata_slice_refcounts[39].base, 80, + g_static_metadata_bytes + 739), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[40].base, 4, - g_static_metadata_bytes + 824), + &g_static_metadata_slice_refcounts[40].base, 7, + g_static_metadata_bytes + 819), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[41].base, 11, - g_static_metadata_bytes + 828), + &g_static_metadata_slice_refcounts[41].base, 4, + g_static_metadata_bytes + 826), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[42].base, 2, - g_static_metadata_bytes + 839), + &g_static_metadata_slice_refcounts[42].base, 11, + g_static_metadata_bytes + 830), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[43].base, 8, + &g_static_metadata_slice_refcounts[43].base, 3, g_static_metadata_bytes + 841), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[44].base, 3, - g_static_metadata_bytes + 849), + &g_static_metadata_slice_refcounts[44].base, 4, + g_static_metadata_bytes + 844), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[45].base, 4, - g_static_metadata_bytes + 852), + &g_static_metadata_slice_refcounts[45].base, 1, + g_static_metadata_bytes + 848), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[46].base, 1, - g_static_metadata_bytes + 856), + &g_static_metadata_slice_refcounts[46].base, 11, + g_static_metadata_bytes + 849), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[47].base, 11, - g_static_metadata_bytes + 857), + &g_static_metadata_slice_refcounts[47].base, 4, + g_static_metadata_bytes + 860), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[48].base, 4, - g_static_metadata_bytes + 868), + &g_static_metadata_slice_refcounts[48].base, 5, + g_static_metadata_bytes + 864), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[49].base, 5, - g_static_metadata_bytes + 872), + &g_static_metadata_slice_refcounts[49].base, 3, + g_static_metadata_bytes + 869), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[50].base, 3, - g_static_metadata_bytes + 877), + g_static_metadata_bytes + 872), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[51].base, 3, - g_static_metadata_bytes + 880), + g_static_metadata_bytes + 875), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[52].base, 3, - g_static_metadata_bytes + 883), + g_static_metadata_bytes + 878), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[53].base, 3, - g_static_metadata_bytes + 886), + g_static_metadata_bytes + 881), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[54].base, 3, - g_static_metadata_bytes + 889), + g_static_metadata_bytes + 884), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[55].base, 3, - g_static_metadata_bytes + 892), + g_static_metadata_bytes + 887), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[56].base, 3, - g_static_metadata_bytes + 895), + &g_static_metadata_slice_refcounts[56].base, 14, + g_static_metadata_bytes + 890), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[57].base, 14, - g_static_metadata_bytes + 898), + &g_static_metadata_slice_refcounts[57].base, 13, + g_static_metadata_bytes + 904), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[58].base, 13, - g_static_metadata_bytes + 912), + &g_static_metadata_slice_refcounts[58].base, 15, + g_static_metadata_bytes + 917), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[59].base, 15, - g_static_metadata_bytes + 925), + &g_static_metadata_slice_refcounts[59].base, 13, + g_static_metadata_bytes + 932), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[60].base, 13, - g_static_metadata_bytes + 940), + &g_static_metadata_slice_refcounts[60].base, 6, + g_static_metadata_bytes + 945), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[61].base, 6, - g_static_metadata_bytes + 953), + &g_static_metadata_slice_refcounts[61].base, 27, + g_static_metadata_bytes + 951), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[62].base, 27, - g_static_metadata_bytes + 959), + &g_static_metadata_slice_refcounts[62].base, 3, + g_static_metadata_bytes + 978), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[63].base, 3, - g_static_metadata_bytes + 986), + &g_static_metadata_slice_refcounts[63].base, 5, + g_static_metadata_bytes + 981), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[64].base, 5, - g_static_metadata_bytes + 989), + &g_static_metadata_slice_refcounts[64].base, 13, + g_static_metadata_bytes + 986), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[65].base, 13, - g_static_metadata_bytes + 994), + g_static_metadata_bytes + 999), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[66].base, 13, - g_static_metadata_bytes + 1007), + &g_static_metadata_slice_refcounts[66].base, 19, + g_static_metadata_bytes + 1012), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[67].base, 19, - g_static_metadata_bytes + 1020), + &g_static_metadata_slice_refcounts[67].base, 16, + g_static_metadata_bytes + 1031), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[68].base, 16, - g_static_metadata_bytes + 1039), + &g_static_metadata_slice_refcounts[68].base, 14, + g_static_metadata_bytes + 1047), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[69].base, 14, - g_static_metadata_bytes + 1055), + &g_static_metadata_slice_refcounts[69].base, 16, + g_static_metadata_bytes + 1061), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[70].base, 16, - g_static_metadata_bytes + 1069), + &g_static_metadata_slice_refcounts[70].base, 13, + g_static_metadata_bytes + 1077), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[71].base, 13, - g_static_metadata_bytes + 1085), + &g_static_metadata_slice_refcounts[71].base, 6, + g_static_metadata_bytes + 1090), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[72].base, 6, - g_static_metadata_bytes + 1098), + &g_static_metadata_slice_refcounts[72].base, 4, + g_static_metadata_bytes + 1096), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[73].base, 4, - g_static_metadata_bytes + 1104), + g_static_metadata_bytes + 1100), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[74].base, 4, - g_static_metadata_bytes + 1108), + &g_static_metadata_slice_refcounts[74].base, 6, + g_static_metadata_bytes + 1104), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[75].base, 6, - g_static_metadata_bytes + 1112), + &g_static_metadata_slice_refcounts[75].base, 7, + g_static_metadata_bytes + 1110), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[76].base, 7, - g_static_metadata_bytes + 1118), + &g_static_metadata_slice_refcounts[76].base, 4, + g_static_metadata_bytes + 1117), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[77].base, 4, - g_static_metadata_bytes + 1125), + &g_static_metadata_slice_refcounts[77].base, 8, + g_static_metadata_bytes + 1121), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[78].base, 8, + &g_static_metadata_slice_refcounts[78].base, 17, g_static_metadata_bytes + 1129), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[79].base, 17, - g_static_metadata_bytes + 1137), + &g_static_metadata_slice_refcounts[79].base, 13, + g_static_metadata_bytes + 1146), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[80].base, 13, - g_static_metadata_bytes + 1154), + &g_static_metadata_slice_refcounts[80].base, 8, + g_static_metadata_bytes + 1159), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[81].base, 8, + &g_static_metadata_slice_refcounts[81].base, 19, g_static_metadata_bytes + 1167), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[82].base, 19, - g_static_metadata_bytes + 1175), + &g_static_metadata_slice_refcounts[82].base, 13, + g_static_metadata_bytes + 1186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[83].base, 13, - g_static_metadata_bytes + 1194), + &g_static_metadata_slice_refcounts[83].base, 4, + g_static_metadata_bytes + 1199), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[84].base, 4, - g_static_metadata_bytes + 1207), + &g_static_metadata_slice_refcounts[84].base, 8, + g_static_metadata_bytes + 1203), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[85].base, 8, + &g_static_metadata_slice_refcounts[85].base, 12, g_static_metadata_bytes + 1211), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[86].base, 12, - g_static_metadata_bytes + 1219), + &g_static_metadata_slice_refcounts[86].base, 18, + g_static_metadata_bytes + 1223), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[87].base, 18, - g_static_metadata_bytes + 1231), + &g_static_metadata_slice_refcounts[87].base, 19, + g_static_metadata_bytes + 1241), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[88].base, 19, - g_static_metadata_bytes + 1249), + &g_static_metadata_slice_refcounts[88].base, 5, + g_static_metadata_bytes + 1260), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[89].base, 5, - g_static_metadata_bytes + 1268), + &g_static_metadata_slice_refcounts[89].base, 7, + g_static_metadata_bytes + 1265), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[90].base, 7, - g_static_metadata_bytes + 1273), + g_static_metadata_bytes + 1272), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[91].base, 7, - g_static_metadata_bytes + 1280), + &g_static_metadata_slice_refcounts[91].base, 11, + g_static_metadata_bytes + 1279), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[92].base, 11, - g_static_metadata_bytes + 1287), + &g_static_metadata_slice_refcounts[92].base, 6, + g_static_metadata_bytes + 1290), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[93].base, 6, - g_static_metadata_bytes + 1298), + &g_static_metadata_slice_refcounts[93].base, 10, + g_static_metadata_bytes + 1296), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[94].base, 10, - g_static_metadata_bytes + 1304), + &g_static_metadata_slice_refcounts[94].base, 25, + g_static_metadata_bytes + 1306), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[95].base, 25, - g_static_metadata_bytes + 1314), + &g_static_metadata_slice_refcounts[95].base, 17, + g_static_metadata_bytes + 1331), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[96].base, 17, - g_static_metadata_bytes + 1339), + &g_static_metadata_slice_refcounts[96].base, 4, + g_static_metadata_bytes + 1348), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[97].base, 4, - g_static_metadata_bytes + 1356), + &g_static_metadata_slice_refcounts[97].base, 3, + g_static_metadata_bytes + 1352), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[98].base, 3, - g_static_metadata_bytes + 1360), + &g_static_metadata_slice_refcounts[98].base, 16, + g_static_metadata_bytes + 1355), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[99].base, 16, - g_static_metadata_bytes + 1363), + &g_static_metadata_slice_refcounts[99].base, 1, + g_static_metadata_bytes + 1371), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[100].base, 1, - g_static_metadata_bytes + 1379), + &g_static_metadata_slice_refcounts[100].base, 8, + g_static_metadata_bytes + 1372), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[101].base, 8, g_static_metadata_bytes + 1380), diff --git a/src/core/lib/slice/static_slice.h b/src/core/lib/slice/static_slice.h index 893b2efd2d8..747b9f2b3f5 100644 --- a/src/core/lib/slice/static_slice.h +++ b/src/core/lib/slice/static_slice.h @@ -49,247 +49,247 @@ static_assert( #define GRPC_MDSTR_AUTHORITY (::grpc_core::g_static_metadata_slice_table[3]) /* ":scheme" */ #define GRPC_MDSTR_SCHEME (::grpc_core::g_static_metadata_slice_table[4]) +/* "te" */ +#define GRPC_MDSTR_TE (::grpc_core::g_static_metadata_slice_table[5]) /* "grpc-message" */ -#define GRPC_MDSTR_GRPC_MESSAGE (::grpc_core::g_static_metadata_slice_table[5]) +#define GRPC_MDSTR_GRPC_MESSAGE (::grpc_core::g_static_metadata_slice_table[6]) /* "grpc-status" */ -#define GRPC_MDSTR_GRPC_STATUS (::grpc_core::g_static_metadata_slice_table[6]) +#define GRPC_MDSTR_GRPC_STATUS (::grpc_core::g_static_metadata_slice_table[7]) /* "grpc-payload-bin" */ #define GRPC_MDSTR_GRPC_PAYLOAD_BIN \ - (::grpc_core::g_static_metadata_slice_table[7]) + (::grpc_core::g_static_metadata_slice_table[8]) /* "grpc-encoding" */ -#define GRPC_MDSTR_GRPC_ENCODING (::grpc_core::g_static_metadata_slice_table[8]) +#define GRPC_MDSTR_GRPC_ENCODING (::grpc_core::g_static_metadata_slice_table[9]) /* "grpc-accept-encoding" */ #define GRPC_MDSTR_GRPC_ACCEPT_ENCODING \ - (::grpc_core::g_static_metadata_slice_table[9]) + (::grpc_core::g_static_metadata_slice_table[10]) /* "grpc-server-stats-bin" */ #define GRPC_MDSTR_GRPC_SERVER_STATS_BIN \ - (::grpc_core::g_static_metadata_slice_table[10]) + (::grpc_core::g_static_metadata_slice_table[11]) /* "grpc-tags-bin" */ #define GRPC_MDSTR_GRPC_TAGS_BIN \ - (::grpc_core::g_static_metadata_slice_table[11]) + (::grpc_core::g_static_metadata_slice_table[12]) /* "grpc-trace-bin" */ #define GRPC_MDSTR_GRPC_TRACE_BIN \ - (::grpc_core::g_static_metadata_slice_table[12]) + (::grpc_core::g_static_metadata_slice_table[13]) /* "content-type" */ -#define GRPC_MDSTR_CONTENT_TYPE (::grpc_core::g_static_metadata_slice_table[13]) +#define GRPC_MDSTR_CONTENT_TYPE (::grpc_core::g_static_metadata_slice_table[14]) /* "content-encoding" */ #define GRPC_MDSTR_CONTENT_ENCODING \ - (::grpc_core::g_static_metadata_slice_table[14]) + (::grpc_core::g_static_metadata_slice_table[15]) /* "accept-encoding" */ #define GRPC_MDSTR_ACCEPT_ENCODING \ - (::grpc_core::g_static_metadata_slice_table[15]) + (::grpc_core::g_static_metadata_slice_table[16]) /* "grpc-internal-encoding-request" */ #define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST \ - (::grpc_core::g_static_metadata_slice_table[16]) + (::grpc_core::g_static_metadata_slice_table[17]) /* "grpc-internal-stream-encoding-request" */ #define GRPC_MDSTR_GRPC_INTERNAL_STREAM_ENCODING_REQUEST \ - (::grpc_core::g_static_metadata_slice_table[17]) + (::grpc_core::g_static_metadata_slice_table[18]) /* "user-agent" */ -#define GRPC_MDSTR_USER_AGENT (::grpc_core::g_static_metadata_slice_table[18]) +#define GRPC_MDSTR_USER_AGENT (::grpc_core::g_static_metadata_slice_table[19]) /* "host" */ -#define GRPC_MDSTR_HOST (::grpc_core::g_static_metadata_slice_table[19]) +#define GRPC_MDSTR_HOST (::grpc_core::g_static_metadata_slice_table[20]) /* "grpc-previous-rpc-attempts" */ #define GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS \ - (::grpc_core::g_static_metadata_slice_table[20]) + (::grpc_core::g_static_metadata_slice_table[21]) /* "grpc-retry-pushback-ms" */ #define GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS \ - (::grpc_core::g_static_metadata_slice_table[21]) + (::grpc_core::g_static_metadata_slice_table[22]) /* "x-endpoint-load-metrics-bin" */ #define GRPC_MDSTR_X_ENDPOINT_LOAD_METRICS_BIN \ - (::grpc_core::g_static_metadata_slice_table[22]) + (::grpc_core::g_static_metadata_slice_table[23]) /* "grpc-timeout" */ -#define GRPC_MDSTR_GRPC_TIMEOUT (::grpc_core::g_static_metadata_slice_table[23]) +#define GRPC_MDSTR_GRPC_TIMEOUT (::grpc_core::g_static_metadata_slice_table[24]) /* "1" */ -#define GRPC_MDSTR_1 (::grpc_core::g_static_metadata_slice_table[24]) +#define GRPC_MDSTR_1 (::grpc_core::g_static_metadata_slice_table[25]) /* "2" */ -#define GRPC_MDSTR_2 (::grpc_core::g_static_metadata_slice_table[25]) +#define GRPC_MDSTR_2 (::grpc_core::g_static_metadata_slice_table[26]) /* "3" */ -#define GRPC_MDSTR_3 (::grpc_core::g_static_metadata_slice_table[26]) +#define GRPC_MDSTR_3 (::grpc_core::g_static_metadata_slice_table[27]) /* "4" */ -#define GRPC_MDSTR_4 (::grpc_core::g_static_metadata_slice_table[27]) +#define GRPC_MDSTR_4 (::grpc_core::g_static_metadata_slice_table[28]) /* "" */ -#define GRPC_MDSTR_EMPTY (::grpc_core::g_static_metadata_slice_table[28]) +#define GRPC_MDSTR_EMPTY (::grpc_core::g_static_metadata_slice_table[29]) /* "grpc.wait_for_ready" */ #define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY \ - (::grpc_core::g_static_metadata_slice_table[29]) + (::grpc_core::g_static_metadata_slice_table[30]) /* "grpc.timeout" */ #define GRPC_MDSTR_GRPC_DOT_TIMEOUT \ - (::grpc_core::g_static_metadata_slice_table[30]) + (::grpc_core::g_static_metadata_slice_table[31]) /* "grpc.max_request_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \ - (::grpc_core::g_static_metadata_slice_table[31]) + (::grpc_core::g_static_metadata_slice_table[32]) /* "grpc.max_response_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \ - (::grpc_core::g_static_metadata_slice_table[32]) + (::grpc_core::g_static_metadata_slice_table[33]) /* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ - (::grpc_core::g_static_metadata_slice_table[33]) + (::grpc_core::g_static_metadata_slice_table[34]) /* "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V2_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS \ - (::grpc_core::g_static_metadata_slice_table[34]) + (::grpc_core::g_static_metadata_slice_table[35]) /* "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V3_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS \ - (::grpc_core::g_static_metadata_slice_table[35]) + (::grpc_core::g_static_metadata_slice_table[36]) /* "/grpc.health.v1.Health/Watch" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_HEALTH_DOT_V1_DOT_HEALTH_SLASH_WATCH \ - (::grpc_core::g_static_metadata_slice_table[36]) + (::grpc_core::g_static_metadata_slice_table[37]) /* "/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES \ - (::grpc_core::g_static_metadata_slice_table[37]) + (::grpc_core::g_static_metadata_slice_table[38]) /* "/envoy.service.discovery.v3.AggregatedDiscoveryService/StreamAggregatedResources" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V3_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES \ - (::grpc_core::g_static_metadata_slice_table[38]) + (::grpc_core::g_static_metadata_slice_table[39]) /* "deflate" */ -#define GRPC_MDSTR_DEFLATE (::grpc_core::g_static_metadata_slice_table[39]) +#define GRPC_MDSTR_DEFLATE (::grpc_core::g_static_metadata_slice_table[40]) /* "gzip" */ -#define GRPC_MDSTR_GZIP (::grpc_core::g_static_metadata_slice_table[40]) +#define GRPC_MDSTR_GZIP (::grpc_core::g_static_metadata_slice_table[41]) /* "stream/gzip" */ #define GRPC_MDSTR_STREAM_SLASH_GZIP \ - (::grpc_core::g_static_metadata_slice_table[41]) -/* "te" */ -#define GRPC_MDSTR_TE (::grpc_core::g_static_metadata_slice_table[42]) -/* "trailers" */ -#define GRPC_MDSTR_TRAILERS (::grpc_core::g_static_metadata_slice_table[43]) + (::grpc_core::g_static_metadata_slice_table[42]) /* "GET" */ -#define GRPC_MDSTR_GET (::grpc_core::g_static_metadata_slice_table[44]) +#define GRPC_MDSTR_GET (::grpc_core::g_static_metadata_slice_table[43]) /* "POST" */ -#define GRPC_MDSTR_POST (::grpc_core::g_static_metadata_slice_table[45]) +#define GRPC_MDSTR_POST (::grpc_core::g_static_metadata_slice_table[44]) /* "/" */ -#define GRPC_MDSTR_SLASH (::grpc_core::g_static_metadata_slice_table[46]) +#define GRPC_MDSTR_SLASH (::grpc_core::g_static_metadata_slice_table[45]) /* "/index.html" */ #define GRPC_MDSTR_SLASH_INDEX_DOT_HTML \ - (::grpc_core::g_static_metadata_slice_table[47]) + (::grpc_core::g_static_metadata_slice_table[46]) /* "http" */ -#define GRPC_MDSTR_HTTP (::grpc_core::g_static_metadata_slice_table[48]) +#define GRPC_MDSTR_HTTP (::grpc_core::g_static_metadata_slice_table[47]) /* "https" */ -#define GRPC_MDSTR_HTTPS (::grpc_core::g_static_metadata_slice_table[49]) +#define GRPC_MDSTR_HTTPS (::grpc_core::g_static_metadata_slice_table[48]) /* "200" */ -#define GRPC_MDSTR_200 (::grpc_core::g_static_metadata_slice_table[50]) +#define GRPC_MDSTR_200 (::grpc_core::g_static_metadata_slice_table[49]) /* "204" */ -#define GRPC_MDSTR_204 (::grpc_core::g_static_metadata_slice_table[51]) +#define GRPC_MDSTR_204 (::grpc_core::g_static_metadata_slice_table[50]) /* "206" */ -#define GRPC_MDSTR_206 (::grpc_core::g_static_metadata_slice_table[52]) +#define GRPC_MDSTR_206 (::grpc_core::g_static_metadata_slice_table[51]) /* "304" */ -#define GRPC_MDSTR_304 (::grpc_core::g_static_metadata_slice_table[53]) +#define GRPC_MDSTR_304 (::grpc_core::g_static_metadata_slice_table[52]) /* "400" */ -#define GRPC_MDSTR_400 (::grpc_core::g_static_metadata_slice_table[54]) +#define GRPC_MDSTR_400 (::grpc_core::g_static_metadata_slice_table[53]) /* "404" */ -#define GRPC_MDSTR_404 (::grpc_core::g_static_metadata_slice_table[55]) +#define GRPC_MDSTR_404 (::grpc_core::g_static_metadata_slice_table[54]) /* "500" */ -#define GRPC_MDSTR_500 (::grpc_core::g_static_metadata_slice_table[56]) +#define GRPC_MDSTR_500 (::grpc_core::g_static_metadata_slice_table[55]) /* "accept-charset" */ #define GRPC_MDSTR_ACCEPT_CHARSET \ - (::grpc_core::g_static_metadata_slice_table[57]) + (::grpc_core::g_static_metadata_slice_table[56]) /* "gzip, deflate" */ #define GRPC_MDSTR_GZIP_COMMA_DEFLATE \ - (::grpc_core::g_static_metadata_slice_table[58]) + (::grpc_core::g_static_metadata_slice_table[57]) /* "accept-language" */ #define GRPC_MDSTR_ACCEPT_LANGUAGE \ - (::grpc_core::g_static_metadata_slice_table[59]) + (::grpc_core::g_static_metadata_slice_table[58]) /* "accept-ranges" */ #define GRPC_MDSTR_ACCEPT_RANGES \ - (::grpc_core::g_static_metadata_slice_table[60]) + (::grpc_core::g_static_metadata_slice_table[59]) /* "accept" */ -#define GRPC_MDSTR_ACCEPT (::grpc_core::g_static_metadata_slice_table[61]) +#define GRPC_MDSTR_ACCEPT (::grpc_core::g_static_metadata_slice_table[60]) /* "access-control-allow-origin" */ #define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN \ - (::grpc_core::g_static_metadata_slice_table[62]) + (::grpc_core::g_static_metadata_slice_table[61]) /* "age" */ -#define GRPC_MDSTR_AGE (::grpc_core::g_static_metadata_slice_table[63]) +#define GRPC_MDSTR_AGE (::grpc_core::g_static_metadata_slice_table[62]) /* "allow" */ -#define GRPC_MDSTR_ALLOW (::grpc_core::g_static_metadata_slice_table[64]) +#define GRPC_MDSTR_ALLOW (::grpc_core::g_static_metadata_slice_table[63]) /* "authorization" */ #define GRPC_MDSTR_AUTHORIZATION \ - (::grpc_core::g_static_metadata_slice_table[65]) + (::grpc_core::g_static_metadata_slice_table[64]) /* "cache-control" */ #define GRPC_MDSTR_CACHE_CONTROL \ - (::grpc_core::g_static_metadata_slice_table[66]) + (::grpc_core::g_static_metadata_slice_table[65]) /* "content-disposition" */ #define GRPC_MDSTR_CONTENT_DISPOSITION \ - (::grpc_core::g_static_metadata_slice_table[67]) + (::grpc_core::g_static_metadata_slice_table[66]) /* "content-language" */ #define GRPC_MDSTR_CONTENT_LANGUAGE \ - (::grpc_core::g_static_metadata_slice_table[68]) + (::grpc_core::g_static_metadata_slice_table[67]) /* "content-length" */ #define GRPC_MDSTR_CONTENT_LENGTH \ - (::grpc_core::g_static_metadata_slice_table[69]) + (::grpc_core::g_static_metadata_slice_table[68]) /* "content-location" */ #define GRPC_MDSTR_CONTENT_LOCATION \ - (::grpc_core::g_static_metadata_slice_table[70]) + (::grpc_core::g_static_metadata_slice_table[69]) /* "content-range" */ #define GRPC_MDSTR_CONTENT_RANGE \ - (::grpc_core::g_static_metadata_slice_table[71]) + (::grpc_core::g_static_metadata_slice_table[70]) /* "cookie" */ -#define GRPC_MDSTR_COOKIE (::grpc_core::g_static_metadata_slice_table[72]) +#define GRPC_MDSTR_COOKIE (::grpc_core::g_static_metadata_slice_table[71]) /* "date" */ -#define GRPC_MDSTR_DATE (::grpc_core::g_static_metadata_slice_table[73]) +#define GRPC_MDSTR_DATE (::grpc_core::g_static_metadata_slice_table[72]) /* "etag" */ -#define GRPC_MDSTR_ETAG (::grpc_core::g_static_metadata_slice_table[74]) +#define GRPC_MDSTR_ETAG (::grpc_core::g_static_metadata_slice_table[73]) /* "expect" */ -#define GRPC_MDSTR_EXPECT (::grpc_core::g_static_metadata_slice_table[75]) +#define GRPC_MDSTR_EXPECT (::grpc_core::g_static_metadata_slice_table[74]) /* "expires" */ -#define GRPC_MDSTR_EXPIRES (::grpc_core::g_static_metadata_slice_table[76]) +#define GRPC_MDSTR_EXPIRES (::grpc_core::g_static_metadata_slice_table[75]) /* "from" */ -#define GRPC_MDSTR_FROM (::grpc_core::g_static_metadata_slice_table[77]) +#define GRPC_MDSTR_FROM (::grpc_core::g_static_metadata_slice_table[76]) /* "if-match" */ -#define GRPC_MDSTR_IF_MATCH (::grpc_core::g_static_metadata_slice_table[78]) +#define GRPC_MDSTR_IF_MATCH (::grpc_core::g_static_metadata_slice_table[77]) /* "if-modified-since" */ #define GRPC_MDSTR_IF_MODIFIED_SINCE \ - (::grpc_core::g_static_metadata_slice_table[79]) + (::grpc_core::g_static_metadata_slice_table[78]) /* "if-none-match" */ #define GRPC_MDSTR_IF_NONE_MATCH \ - (::grpc_core::g_static_metadata_slice_table[80]) + (::grpc_core::g_static_metadata_slice_table[79]) /* "if-range" */ -#define GRPC_MDSTR_IF_RANGE (::grpc_core::g_static_metadata_slice_table[81]) +#define GRPC_MDSTR_IF_RANGE (::grpc_core::g_static_metadata_slice_table[80]) /* "if-unmodified-since" */ #define GRPC_MDSTR_IF_UNMODIFIED_SINCE \ - (::grpc_core::g_static_metadata_slice_table[82]) + (::grpc_core::g_static_metadata_slice_table[81]) /* "last-modified" */ #define GRPC_MDSTR_LAST_MODIFIED \ - (::grpc_core::g_static_metadata_slice_table[83]) + (::grpc_core::g_static_metadata_slice_table[82]) /* "link" */ -#define GRPC_MDSTR_LINK (::grpc_core::g_static_metadata_slice_table[84]) +#define GRPC_MDSTR_LINK (::grpc_core::g_static_metadata_slice_table[83]) /* "location" */ -#define GRPC_MDSTR_LOCATION (::grpc_core::g_static_metadata_slice_table[85]) +#define GRPC_MDSTR_LOCATION (::grpc_core::g_static_metadata_slice_table[84]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (::grpc_core::g_static_metadata_slice_table[86]) +#define GRPC_MDSTR_MAX_FORWARDS (::grpc_core::g_static_metadata_slice_table[85]) /* "proxy-authenticate" */ #define GRPC_MDSTR_PROXY_AUTHENTICATE \ - (::grpc_core::g_static_metadata_slice_table[87]) + (::grpc_core::g_static_metadata_slice_table[86]) /* "proxy-authorization" */ #define GRPC_MDSTR_PROXY_AUTHORIZATION \ - (::grpc_core::g_static_metadata_slice_table[88]) + (::grpc_core::g_static_metadata_slice_table[87]) /* "range" */ -#define GRPC_MDSTR_RANGE (::grpc_core::g_static_metadata_slice_table[89]) +#define GRPC_MDSTR_RANGE (::grpc_core::g_static_metadata_slice_table[88]) /* "referer" */ -#define GRPC_MDSTR_REFERER (::grpc_core::g_static_metadata_slice_table[90]) +#define GRPC_MDSTR_REFERER (::grpc_core::g_static_metadata_slice_table[89]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (::grpc_core::g_static_metadata_slice_table[91]) +#define GRPC_MDSTR_REFRESH (::grpc_core::g_static_metadata_slice_table[90]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (::grpc_core::g_static_metadata_slice_table[92]) +#define GRPC_MDSTR_RETRY_AFTER (::grpc_core::g_static_metadata_slice_table[91]) /* "server" */ -#define GRPC_MDSTR_SERVER (::grpc_core::g_static_metadata_slice_table[93]) +#define GRPC_MDSTR_SERVER (::grpc_core::g_static_metadata_slice_table[92]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (::grpc_core::g_static_metadata_slice_table[94]) +#define GRPC_MDSTR_SET_COOKIE (::grpc_core::g_static_metadata_slice_table[93]) /* "strict-transport-security" */ #define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY \ - (::grpc_core::g_static_metadata_slice_table[95]) + (::grpc_core::g_static_metadata_slice_table[94]) /* "transfer-encoding" */ #define GRPC_MDSTR_TRANSFER_ENCODING \ - (::grpc_core::g_static_metadata_slice_table[96]) + (::grpc_core::g_static_metadata_slice_table[95]) /* "vary" */ -#define GRPC_MDSTR_VARY (::grpc_core::g_static_metadata_slice_table[97]) +#define GRPC_MDSTR_VARY (::grpc_core::g_static_metadata_slice_table[96]) /* "via" */ -#define GRPC_MDSTR_VIA (::grpc_core::g_static_metadata_slice_table[98]) +#define GRPC_MDSTR_VIA (::grpc_core::g_static_metadata_slice_table[97]) /* "www-authenticate" */ #define GRPC_MDSTR_WWW_AUTHENTICATE \ - (::grpc_core::g_static_metadata_slice_table[99]) + (::grpc_core::g_static_metadata_slice_table[98]) /* "0" */ -#define GRPC_MDSTR_0 (::grpc_core::g_static_metadata_slice_table[100]) +#define GRPC_MDSTR_0 (::grpc_core::g_static_metadata_slice_table[99]) /* "identity" */ -#define GRPC_MDSTR_IDENTITY (::grpc_core::g_static_metadata_slice_table[101]) +#define GRPC_MDSTR_IDENTITY (::grpc_core::g_static_metadata_slice_table[100]) +/* "trailers" */ +#define GRPC_MDSTR_TRAILERS (::grpc_core::g_static_metadata_slice_table[101]) /* "application/grpc" */ #define GRPC_MDSTR_APPLICATION_SLASH_GRPC \ (::grpc_core::g_static_metadata_slice_table[102]) diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 2a4ec68057e..61c2921ba28 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -1755,7 +1755,7 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops, if (op->data.send_status_from_server.status_details != nullptr) { call->send_extra_metadata[1].md = grpc_mdelem_from_slices( GRPC_MDSTR_GRPC_MESSAGE, - grpc_slice_copy( + grpc_slice_ref_internal( *op->data.send_status_from_server.status_details)); call->send_extra_metadata_count++; if (status_error != GRPC_ERROR_NONE) { diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index f4af87e67f3..1f903e7668c 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -423,19 +423,35 @@ grpc_call* grpc_channel_create_pollset_set_call( namespace grpc_core { RegisteredCall::RegisteredCall(const char* method_arg, const char* host_arg) - : path(method_arg != nullptr && method_arg[0] != 0 - ? grpc_mdelem_from_slices( - GRPC_MDSTR_PATH, grpc_slice_from_copied_string(method_arg)) - : GRPC_MDNULL), - authority( - host_arg != nullptr && host_arg[0] != 0 - ? grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, - grpc_slice_from_copied_string(host_arg)) - : GRPC_MDNULL) {} - + : method(method_arg != nullptr ? method_arg : ""), + host(host_arg != nullptr ? host_arg : ""), + path(grpc_mdelem_from_slices( + GRPC_MDSTR_PATH, grpc_core::ExternallyManagedSlice(method.c_str()))), + authority(!host.empty() + ? grpc_mdelem_from_slices( + GRPC_MDSTR_AUTHORITY, + grpc_core::ExternallyManagedSlice(host.c_str())) + : GRPC_MDNULL) {} + +// TODO(vjpai): Delete copy-constructor when allowed by all supported compilers. RegisteredCall::RegisteredCall(const RegisteredCall& other) - : path(GRPC_MDELEM_REF(other.path)), - authority(GRPC_MDELEM_REF(other.authority)) {} + : RegisteredCall(other.method.c_str(), other.host.c_str()) {} + +RegisteredCall::RegisteredCall(RegisteredCall&& other) noexcept + : method(std::move(other.method)), + host(std::move(other.host)), + path(grpc_mdelem_from_slices( + GRPC_MDSTR_PATH, grpc_core::ExternallyManagedSlice(method.c_str()))), + authority(!host.empty() + ? grpc_mdelem_from_slices( + GRPC_MDSTR_AUTHORITY, + grpc_core::ExternallyManagedSlice(host.c_str())) + : GRPC_MDNULL) { + GRPC_MDELEM_UNREF(other.path); + GRPC_MDELEM_UNREF(other.authority); + other.path = GRPC_MDNULL; + other.authority = GRPC_MDNULL; +} RegisteredCall::~RegisteredCall() { GRPC_MDELEM_UNREF(path); diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 353df77c783..4e885fa85a7 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -82,12 +82,21 @@ void grpc_channel_update_call_size_estimate(grpc_channel* channel, size_t size); namespace grpc_core { struct RegisteredCall { + // The method and host are kept as part of this struct just to manage their + // lifetime since they must outlive the mdelem contents. + std::string method; + std::string host; + grpc_mdelem path; grpc_mdelem authority; explicit RegisteredCall(const char* method_arg, const char* host_arg); + // TODO(vjpai): delete copy constructor once all supported compilers allow + // std::map value_type to be MoveConstructible. RegisteredCall(const RegisteredCall& other); + RegisteredCall(RegisteredCall&& other) noexcept; RegisteredCall& operator=(const RegisteredCall&) = delete; + RegisteredCall& operator=(RegisteredCall&&) = delete; ~RegisteredCall(); }; diff --git a/src/core/lib/transport/metadata.cc b/src/core/lib/transport/metadata.cc index 004e44af23e..09832a6417a 100644 --- a/src/core/lib/transport/metadata.cc +++ b/src/core/lib/transport/metadata.cc @@ -549,35 +549,14 @@ grpc_mdelem grpc_mdelem_from_slices( } grpc_mdelem grpc_mdelem_from_grpc_metadata(grpc_metadata* metadata) { - bool key_changed = false; + bool changed = false; grpc_slice key_slice = - grpc_slice_maybe_static_intern(metadata->key, &key_changed); - bool value_changed = false; - grpc_slice* unref_slice = nullptr; + grpc_slice_maybe_static_intern(metadata->key, &changed); grpc_slice value_slice = - grpc_slice_maybe_static_intern(metadata->value, &value_changed); - // If key or value changed, but the other didn't.... AND the other is a NOP - // refcount, then we need to convert it to a slice with a refcount else we run - // the risk of leaving a dangling reference to that metadata on the heap via - // this mdelem. - if (key_changed && !value_changed && value_slice.refcount != nullptr && - value_slice.refcount->GetType() == grpc_slice_refcount::Type::NOP) { - value_slice = grpc_slice_copy(value_slice); - unref_slice = &value_slice; - value_changed = true; - } else if (!key_changed && value_changed && key_slice.refcount != nullptr && - key_slice.refcount->GetType() == grpc_slice_refcount::Type::NOP) { - key_slice = grpc_slice_copy(key_slice); - unref_slice = &key_slice; - key_changed = true; - } - auto mdelem = - grpc_mdelem_create(key_slice, value_slice, - key_changed || value_changed - ? nullptr - : reinterpret_cast(metadata)); - if (unref_slice != nullptr) grpc_slice_unref_internal(*unref_slice); - return mdelem; + grpc_slice_maybe_static_intern(metadata->value, &changed); + return grpc_mdelem_create( + key_slice, value_slice, + changed ? nullptr : reinterpret_cast(metadata)); } static void* get_user_data(UserData* user_data, void (*destroy_func)(void*)) { diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc index c651faa72e0..378d144836e 100644 --- a/src/core/lib/transport/metadata_batch.cc +++ b/src/core/lib/transport/metadata_batch.cc @@ -41,47 +41,34 @@ void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage, GRPC_MDELEM_UNREF(old_mdelem); } -namespace { - -class CopySink { - public: - explicit CopySink(grpc_metadata_batch* dst) : dst_(dst) {} - - void Encode(grpc_mdelem md) { +void grpc_metadata_batch_copy(grpc_metadata_batch* src, + grpc_metadata_batch* dst, + grpc_linked_mdelem* storage) { + dst->Clear(); + // TODO(ctiller): this should be templated and automatically derived. + if (auto* p = src->get_pointer(grpc_core::GrpcTimeoutMetadata())) { + dst->Set(grpc_core::GrpcTimeoutMetadata(), *p); + } + size_t i = 0; + src->ForEach([&](grpc_mdelem md) { // If the mdelem is not external, take a ref. // Otherwise, create a new copy, holding its own refs to the // underlying slices. if (GRPC_MDELEM_STORAGE(md) != GRPC_MDELEM_STORAGE_EXTERNAL) { md = GRPC_MDELEM_REF(md); } else { - md = grpc_mdelem_from_slices(grpc_slice_copy(GRPC_MDKEY(md)), - grpc_slice_copy(GRPC_MDVALUE(md))); + md = grpc_mdelem_from_slices(grpc_slice_ref_internal(GRPC_MDKEY(md)), + grpc_slice_ref_internal(GRPC_MDVALUE(md))); } // Error unused in non-debug builds. - grpc_error_handle GRPC_UNUSED error = dst_->Append(md); - // The only way that Append() can fail is if + grpc_error_handle GRPC_UNUSED error = + grpc_metadata_batch_add_tail(dst, &storage[i++], md); + // The only way that grpc_metadata_batch_add_tail() can fail is if // there's a duplicate entry for a callout. However, that can't be // the case here, because we would not have been allowed to create // a source batch that had that kind of conflict. GPR_DEBUG_ASSERT(error == GRPC_ERROR_NONE); - } - - template - void Encode(T trait, V value) { - dst_->Set(trait, value); - } - - private: - grpc_metadata_batch* dst_; -}; - -} // namespace - -void grpc_metadata_batch_copy(const grpc_metadata_batch* src, - grpc_metadata_batch* dst) { - dst->Clear(); - CopySink sink(dst); - src->Encode(&sink); + }); } grpc_error_handle grpc_attach_md_to_error(grpc_error_handle src, diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index fbd9abc77bc..893e22de392 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -88,7 +88,6 @@ struct GrpcTimeoutMetadata { if (GPR_UNLIKELY(!grpc_http2_decode_timeout(value, &timeout))) { timeout = GRPC_MILLIS_INF_FUTURE; } - grpc_slice_unref_internal(value); return timeout; } static ValueType MementoToValue(MementoType timeout) { @@ -97,115 +96,9 @@ struct GrpcTimeoutMetadata { } return grpc_core::ExecCtx::Get()->Now() + timeout; } - static grpc_slice Encode(ValueType x) { - char timeout[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE]; - grpc_http2_encode_timeout(x, timeout); - return grpc_slice_from_copied_string(timeout); - } static MementoType DisplayValue(MementoType x) { return x; } }; -// TE metadata trait. -struct TeMetadata { - // HTTP2 says that TE can either be empty or "trailers". - // Empty means this trait is not included, "trailers" means kTrailers, and - // kInvalid is used to remember an invalid value. - enum ValueType : uint8_t { - kTrailers, - kInvalid, - }; - using MementoType = ValueType; - static const char* key() { return "te"; } - static MementoType ParseMemento(const grpc_slice& value) { - auto out = kInvalid; - if (grpc_slice_eq(value, GRPC_MDSTR_TRAILERS)) { - out = kTrailers; - } - grpc_slice_unref_internal(value); - return out; - } - static ValueType MementoToValue(MementoType te) { return te; } - static grpc_slice Encode(ValueType x) { - GPR_ASSERT(x == kTrailers); - return GRPC_MDSTR_TRAILERS; - } - static const char* DisplayValue(MementoType te) { - switch (te) { - case ValueType::kTrailers: - return "trailers"; - default: - return ""; - } - } -}; - -namespace metadata_detail { - -// Inner implementation of MetadataMap::Parse() -// Recursive in terms of metadata trait, tries each known type in order by doing -// a string comparison on key, and if that key is found parses it. If not found, -// calls not_found to generate the result value. -template -struct ParseHelper; - -template -struct ParseHelper { - template - static ParsedMetadata Parse(absl::string_view key, - const grpc_slice& value, - NotFound not_found) { - if (key == Trait::key()) { - return ParsedMetadata( - Trait(), Trait::ParseMemento(value), - ParsedMetadata::TransportSize(key.size(), - GRPC_SLICE_LENGTH(value))); - } - return ParseHelper::Parse(key, value, not_found); - } -}; - -template -struct ParseHelper { - template - static ParsedMetadata Parse(absl::string_view, const grpc_slice&, - NotFound not_found) { - return not_found(); - } -}; - -// Inner implementation of MetadataMap::Append() -// Recursive in terms of metadata trait, tries each known type in order by doing -// a string comparison on key, and if that key is found sets it. If not found, -// calls not_found to append generically. -template -struct AppendHelper; - -template -struct AppendHelper { - template - static void Append(Container* container, absl::string_view key, - const grpc_slice& value, NotFound not_found) { - if (key == Trait::key()) { - container->Set(Trait(), - Trait::MementoToValue(Trait::ParseMemento(value))); - return; - } - AppendHelper::Append(container, key, value, - not_found); - } -}; - -template -struct AppendHelper { - template - static void Append(Container*, absl::string_view, const grpc_slice&, - NotFound not_found) { - not_found(); - } -}; - -} // namespace metadata_detail - // MetadataMap encodes the mapping of metadata keys to metadata values. // Right now the API presented is the minimal one that will allow us to // substitute this type for grpc_metadata_batch in a relatively easy fashion. At @@ -230,13 +123,9 @@ struct AppendHelper { // // The string key for this metadata type (for transports that require it) // static constexpr char* key() { return "grpc-xyz"; } // // Parse a memento from a slice -// // Takes ownership of value // static MementoType ParseMemento(const grpc_slice& value) { ... } // // Convert a memento to a value // static ValueType MementoToValue(MementoType memento) { ... } -// // Convert a value to its canonical text wire format (the format that -// // ParseMemento will accept!) -// static grpc_slice Encode(ValueType value); // // Convert a value to something that can be passed to StrCat and displayed // // for debugging // static SomeStrCatableType DisplayValue(MementoType value) { ... } @@ -334,36 +223,23 @@ class MetadataMap { table_.template clear>(); } - // Extract a piece of known metadata. - // Returns nullopt if the metadata was not present, or the value if it was. - // The same as: - // auto value = m.get(T()); - // m.Remove(T()); - template - absl::optional Take(Which which) { - auto value = get(which); - Remove(which); - return value; - } - // Parse metadata from a key/value pair, and return an object representing // that result. - // TODO(ctiller): key should probably be an absl::string_view. - // Once we don't care about interning anymore, make that change! template static ParsedMetadata Parse(const KeySlice& key, const ValueSlice& value) { - bool parsed = true; - auto out = metadata_detail::ParseHelper::Parse( - StringViewFromSlice(key), value, [&] { - parsed = false; - return ParsedMetadata( - grpc_mdelem_from_slices(key, value)); - }); - if (parsed) { + auto key_view = StringViewFromSlice(key); + // hack for now. + if (key_view == GrpcTimeoutMetadata::key()) { + ParsedMetadata out( + GrpcTimeoutMetadata(), GrpcTimeoutMetadata::ParseMemento(value), + ParsedMetadata::TransportSize(GRPC_SLICE_LENGTH(key), + GRPC_SLICE_LENGTH(value))); grpc_slice_unref_internal(key); + grpc_slice_unref_internal(value); + return out; } - return out; + return ParsedMetadata(grpc_mdelem_from_slices(key, value)); } // Set a value from a parsed metadata object. @@ -372,18 +248,6 @@ class MetadataMap { return m.SetOnContainer(this); } - // Append a key/value pair - takes ownership of value - void Append(absl::string_view key, const grpc_slice& value) { - metadata_detail::AppendHelper::Append( - this, key, value, [&] { - GPR_ASSERT(GRPC_ERROR_NONE == - Append(grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_buffer( - key.data(), key.length())), - value))); - }); - } - // // All APIs below this point are subject to change. // @@ -896,8 +760,7 @@ bool MetadataMap::ReplaceIfExists(grpc_slice key, grpc_slice value) { } // namespace grpc_core using grpc_metadata_batch = - grpc_core::MetadataMap; + grpc_core::MetadataMap; inline void grpc_metadata_batch_clear(grpc_metadata_batch* batch) { batch->Clear(); @@ -1043,13 +906,17 @@ inline void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch) { batch->AssertOk(); } -/// Copies \a src to \a dst. +/// Copies \a src to \a dst. \a storage must point to an array of +/// \a grpc_linked_mdelem structs of at least the same size as \a src. /// /// For each mdelem in \a src, if the mdelem is of storage types /// GRPC_MDELEM_STORAGE_INTERNED or GRPC_MDELEM_STORAGE_ALLOCATED, /// refs the original mdelem for the copy. Otherwise, makes a new /// mdelem that will hold its own refs to the key and value slices. -void grpc_metadata_batch_copy(const grpc_metadata_batch* src, - grpc_metadata_batch* dst); +/// +/// Currently used only in the retry code. +void grpc_metadata_batch_copy(grpc_metadata_batch* src, + grpc_metadata_batch* dst, + grpc_linked_mdelem* storage); #endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */ diff --git a/src/core/lib/transport/parsed_metadata.h b/src/core/lib/transport/parsed_metadata.h index 287fc2e5db7..f022bbf991f 100644 --- a/src/core/lib/transport/parsed_metadata.h +++ b/src/core/lib/transport/parsed_metadata.h @@ -184,10 +184,7 @@ ParsedMetadata::TrivialTraitVTable() { }, // debug_string [](intptr_t value) { - return absl::StrCat( - Which::key(), ": ", - Which::DisplayValue( - static_cast(value))); + return absl::StrCat(Which::key(), ": ", Which::DisplayValue(value)); }}; return &vtable; } diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index 71f4deef504..df64527e9c2 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -36,590 +36,597 @@ StaticMetadata g_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { &g_static_metadata_slice_refcounts[3].base, 10, g_static_metadata_bytes + 19), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 0), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[1].base, 7, g_static_metadata_bytes + 5), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[44].base, 3, - g_static_metadata_bytes + 849), + &g_static_metadata_slice_refcounts[43].base, 3, + g_static_metadata_bytes + 841), 1), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[1].base, 7, g_static_metadata_bytes + 5), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[45].base, 4, - g_static_metadata_bytes + 852), + &g_static_metadata_slice_refcounts[44].base, 4, + g_static_metadata_bytes + 844), 2), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[0].base, 5, g_static_metadata_bytes + 0), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[46].base, 1, - g_static_metadata_bytes + 856), + &g_static_metadata_slice_refcounts[45].base, 1, + g_static_metadata_bytes + 848), 3), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[0].base, 5, g_static_metadata_bytes + 0), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[47].base, 11, - g_static_metadata_bytes + 857), + &g_static_metadata_slice_refcounts[46].base, 11, + g_static_metadata_bytes + 849), 4), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[4].base, 7, g_static_metadata_bytes + 29), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[48].base, 4, - g_static_metadata_bytes + 868), + &g_static_metadata_slice_refcounts[47].base, 4, + g_static_metadata_bytes + 860), 5), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[4].base, 7, g_static_metadata_bytes + 29), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[49].base, 5, - g_static_metadata_bytes + 872), + &g_static_metadata_slice_refcounts[48].base, 5, + g_static_metadata_bytes + 864), 6), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[50].base, 3, - g_static_metadata_bytes + 877), + &g_static_metadata_slice_refcounts[49].base, 3, + g_static_metadata_bytes + 869), 7), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[51].base, 3, - g_static_metadata_bytes + 880), + &g_static_metadata_slice_refcounts[50].base, 3, + g_static_metadata_bytes + 872), 8), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[52].base, 3, - g_static_metadata_bytes + 883), + &g_static_metadata_slice_refcounts[51].base, 3, + g_static_metadata_bytes + 875), 9), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[53].base, 3, - g_static_metadata_bytes + 886), + &g_static_metadata_slice_refcounts[52].base, 3, + g_static_metadata_bytes + 878), 10), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[54].base, 3, - g_static_metadata_bytes + 889), + &g_static_metadata_slice_refcounts[53].base, 3, + g_static_metadata_bytes + 881), 11), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[55].base, 3, - g_static_metadata_bytes + 892), + &g_static_metadata_slice_refcounts[54].base, 3, + g_static_metadata_bytes + 884), 12), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[2].base, 7, g_static_metadata_bytes + 12), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[56].base, 3, - g_static_metadata_bytes + 895), + &g_static_metadata_slice_refcounts[55].base, 3, + g_static_metadata_bytes + 887), 13), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[57].base, 14, - g_static_metadata_bytes + 898), + &g_static_metadata_slice_refcounts[56].base, 14, + g_static_metadata_bytes + 890), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 14), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[58].base, 13, - g_static_metadata_bytes + 912), + &g_static_metadata_slice_refcounts[57].base, 13, + g_static_metadata_bytes + 904), 15), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[59].base, 15, - g_static_metadata_bytes + 925), + &g_static_metadata_slice_refcounts[58].base, 15, + g_static_metadata_bytes + 917), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 16), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[60].base, 13, - g_static_metadata_bytes + 940), + &g_static_metadata_slice_refcounts[59].base, 13, + g_static_metadata_bytes + 932), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 17), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[61].base, 6, - g_static_metadata_bytes + 953), + &g_static_metadata_slice_refcounts[60].base, 6, + g_static_metadata_bytes + 945), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 18), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[62].base, 27, - g_static_metadata_bytes + 959), + &g_static_metadata_slice_refcounts[61].base, 27, + g_static_metadata_bytes + 951), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 19), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[63].base, 3, - g_static_metadata_bytes + 986), + &g_static_metadata_slice_refcounts[62].base, 3, + g_static_metadata_bytes + 978), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 20), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[64].base, 5, - g_static_metadata_bytes + 989), + &g_static_metadata_slice_refcounts[63].base, 5, + g_static_metadata_bytes + 981), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 21), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[65].base, 13, - g_static_metadata_bytes + 994), + &g_static_metadata_slice_refcounts[64].base, 13, + g_static_metadata_bytes + 986), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 22), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[66].base, 13, - g_static_metadata_bytes + 1007), + &g_static_metadata_slice_refcounts[65].base, 13, + g_static_metadata_bytes + 999), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 23), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[67].base, 19, - g_static_metadata_bytes + 1020), + &g_static_metadata_slice_refcounts[66].base, 19, + g_static_metadata_bytes + 1012), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 24), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[14].base, 16, - g_static_metadata_bytes + 168), + &g_static_metadata_slice_refcounts[15].base, 16, + g_static_metadata_bytes + 170), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 25), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[68].base, 16, - g_static_metadata_bytes + 1039), + &g_static_metadata_slice_refcounts[67].base, 16, + g_static_metadata_bytes + 1031), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 26), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[69].base, 14, - g_static_metadata_bytes + 1055), + &g_static_metadata_slice_refcounts[68].base, 14, + g_static_metadata_bytes + 1047), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 27), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[70].base, 16, - g_static_metadata_bytes + 1069), + &g_static_metadata_slice_refcounts[69].base, 16, + g_static_metadata_bytes + 1061), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 28), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[71].base, 13, - g_static_metadata_bytes + 1085), + &g_static_metadata_slice_refcounts[70].base, 13, + g_static_metadata_bytes + 1077), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 29), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[13].base, 12, - g_static_metadata_bytes + 156), + &g_static_metadata_slice_refcounts[14].base, 12, + g_static_metadata_bytes + 158), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 30), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[72].base, 6, - g_static_metadata_bytes + 1098), + &g_static_metadata_slice_refcounts[71].base, 6, + g_static_metadata_bytes + 1090), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 31), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[73].base, 4, - g_static_metadata_bytes + 1104), + &g_static_metadata_slice_refcounts[72].base, 4, + g_static_metadata_bytes + 1096), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 32), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[74].base, 4, - g_static_metadata_bytes + 1108), + &g_static_metadata_slice_refcounts[73].base, 4, + g_static_metadata_bytes + 1100), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 33), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[75].base, 6, - g_static_metadata_bytes + 1112), + &g_static_metadata_slice_refcounts[74].base, 6, + g_static_metadata_bytes + 1104), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 34), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[76].base, 7, - g_static_metadata_bytes + 1118), + &g_static_metadata_slice_refcounts[75].base, 7, + g_static_metadata_bytes + 1110), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 35), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[77].base, 4, - g_static_metadata_bytes + 1125), + &g_static_metadata_slice_refcounts[76].base, 4, + g_static_metadata_bytes + 1117), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 36), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[19].base, 4, - g_static_metadata_bytes + 276), + &g_static_metadata_slice_refcounts[20].base, 4, + g_static_metadata_bytes + 278), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 37), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[78].base, 8, - g_static_metadata_bytes + 1129), + &g_static_metadata_slice_refcounts[77].base, 8, + g_static_metadata_bytes + 1121), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 38), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[79].base, 17, - g_static_metadata_bytes + 1137), + &g_static_metadata_slice_refcounts[78].base, 17, + g_static_metadata_bytes + 1129), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 39), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[80].base, 13, - g_static_metadata_bytes + 1154), + &g_static_metadata_slice_refcounts[79].base, 13, + g_static_metadata_bytes + 1146), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 40), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[81].base, 8, - g_static_metadata_bytes + 1167), + &g_static_metadata_slice_refcounts[80].base, 8, + g_static_metadata_bytes + 1159), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 41), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[82].base, 19, - g_static_metadata_bytes + 1175), + &g_static_metadata_slice_refcounts[81].base, 19, + g_static_metadata_bytes + 1167), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 42), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[83].base, 13, - g_static_metadata_bytes + 1194), + &g_static_metadata_slice_refcounts[82].base, 13, + g_static_metadata_bytes + 1186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 43), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[84].base, 4, - g_static_metadata_bytes + 1207), + &g_static_metadata_slice_refcounts[83].base, 4, + g_static_metadata_bytes + 1199), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 44), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[85].base, 8, - g_static_metadata_bytes + 1211), + &g_static_metadata_slice_refcounts[84].base, 8, + g_static_metadata_bytes + 1203), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 45), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[86].base, 12, - g_static_metadata_bytes + 1219), + &g_static_metadata_slice_refcounts[85].base, 12, + g_static_metadata_bytes + 1211), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 46), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[87].base, 18, - g_static_metadata_bytes + 1231), + &g_static_metadata_slice_refcounts[86].base, 18, + g_static_metadata_bytes + 1223), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 47), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[88].base, 19, - g_static_metadata_bytes + 1249), + &g_static_metadata_slice_refcounts[87].base, 19, + g_static_metadata_bytes + 1241), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 48), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[89].base, 5, - g_static_metadata_bytes + 1268), + &g_static_metadata_slice_refcounts[88].base, 5, + g_static_metadata_bytes + 1260), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 49), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[90].base, 7, - g_static_metadata_bytes + 1273), + &g_static_metadata_slice_refcounts[89].base, 7, + g_static_metadata_bytes + 1265), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 50), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[91].base, 7, - g_static_metadata_bytes + 1280), + &g_static_metadata_slice_refcounts[90].base, 7, + g_static_metadata_bytes + 1272), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 51), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[92].base, 11, - g_static_metadata_bytes + 1287), + &g_static_metadata_slice_refcounts[91].base, 11, + g_static_metadata_bytes + 1279), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 52), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[93].base, 6, - g_static_metadata_bytes + 1298), + &g_static_metadata_slice_refcounts[92].base, 6, + g_static_metadata_bytes + 1290), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 53), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[94].base, 10, - g_static_metadata_bytes + 1304), + &g_static_metadata_slice_refcounts[93].base, 10, + g_static_metadata_bytes + 1296), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 54), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[95].base, 25, - g_static_metadata_bytes + 1314), + &g_static_metadata_slice_refcounts[94].base, 25, + g_static_metadata_bytes + 1306), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 55), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[96].base, 17, - g_static_metadata_bytes + 1339), + &g_static_metadata_slice_refcounts[95].base, 17, + g_static_metadata_bytes + 1331), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 56), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[18].base, 10, - g_static_metadata_bytes + 266), + &g_static_metadata_slice_refcounts[19].base, 10, + g_static_metadata_bytes + 268), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 57), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[97].base, 4, - g_static_metadata_bytes + 1356), + &g_static_metadata_slice_refcounts[96].base, 4, + g_static_metadata_bytes + 1348), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 58), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[98].base, 3, - g_static_metadata_bytes + 1360), + &g_static_metadata_slice_refcounts[97].base, 3, + g_static_metadata_bytes + 1352), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 59), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[99].base, 16, - g_static_metadata_bytes + 1363), + &g_static_metadata_slice_refcounts[98].base, 16, + g_static_metadata_bytes + 1355), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 60), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[6].base, 11, - g_static_metadata_bytes + 48), + &g_static_metadata_slice_refcounts[7].base, 11, + g_static_metadata_bytes + 50), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[100].base, 1, - g_static_metadata_bytes + 1379), + &g_static_metadata_slice_refcounts[99].base, 1, + g_static_metadata_bytes + 1371), 61), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[6].base, 11, - g_static_metadata_bytes + 48), + &g_static_metadata_slice_refcounts[7].base, 11, + g_static_metadata_bytes + 50), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[24].base, 1, - g_static_metadata_bytes + 367), + &g_static_metadata_slice_refcounts[25].base, 1, + g_static_metadata_bytes + 369), 62), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[6].base, 11, - g_static_metadata_bytes + 48), + &g_static_metadata_slice_refcounts[7].base, 11, + g_static_metadata_bytes + 50), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[25].base, 1, - g_static_metadata_bytes + 368), + &g_static_metadata_slice_refcounts[26].base, 1, + g_static_metadata_bytes + 370), 63), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[8].base, 13, - g_static_metadata_bytes + 75), + &g_static_metadata_slice_refcounts[9].base, 13, + g_static_metadata_bytes + 77), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[101].base, 8, - g_static_metadata_bytes + 1380), + &g_static_metadata_slice_refcounts[100].base, 8, + g_static_metadata_bytes + 1372), 64), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[8].base, 13, - g_static_metadata_bytes + 75), + &g_static_metadata_slice_refcounts[9].base, 13, + g_static_metadata_bytes + 77), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[40].base, 4, - g_static_metadata_bytes + 824), + &g_static_metadata_slice_refcounts[41].base, 4, + g_static_metadata_bytes + 826), 65), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[8].base, 13, - g_static_metadata_bytes + 75), + &g_static_metadata_slice_refcounts[9].base, 13, + g_static_metadata_bytes + 77), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[39].base, 7, - g_static_metadata_bytes + 817), + &g_static_metadata_slice_refcounts[40].base, 7, + g_static_metadata_bytes + 819), 66), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[13].base, 12, - g_static_metadata_bytes + 156), + &g_static_metadata_slice_refcounts[5].base, 2, + g_static_metadata_bytes + 36), + grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[101].base, 8, + g_static_metadata_bytes + 1380), + 67), + StaticMetadata(grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[14].base, 12, + g_static_metadata_bytes + 158), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[102].base, 16, g_static_metadata_bytes + 1388), - 67), + 68), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[4].base, 7, g_static_metadata_bytes + 29), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[103].base, 4, g_static_metadata_bytes + 1404), - 68), + 69), StaticMetadata(grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[1].base, 7, g_static_metadata_bytes + 5), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[104].base, 3, g_static_metadata_bytes + 1408), - 69), - StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), - grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), 70), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[14].base, 16, - g_static_metadata_bytes + 168), + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[101].base, 8, - g_static_metadata_bytes + 1380), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 71), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[14].base, 16, - g_static_metadata_bytes + 168), + &g_static_metadata_slice_refcounts[15].base, 16, + g_static_metadata_bytes + 170), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[40].base, 4, - g_static_metadata_bytes + 824), + &g_static_metadata_slice_refcounts[100].base, 8, + g_static_metadata_bytes + 1372), 72), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[105].base, 11, - g_static_metadata_bytes + 1411), + &g_static_metadata_slice_refcounts[15].base, 16, + g_static_metadata_bytes + 170), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[28].base, 0, - g_static_metadata_bytes + 371), + &g_static_metadata_slice_refcounts[41].base, 4, + g_static_metadata_bytes + 826), 73), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[105].base, 11, + g_static_metadata_bytes + 1411), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[101].base, 8, - g_static_metadata_bytes + 1380), + &g_static_metadata_slice_refcounts[29].base, 0, + g_static_metadata_bytes + 373), 74), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[39].base, 7, - g_static_metadata_bytes + 817), + &g_static_metadata_slice_refcounts[100].base, 8, + g_static_metadata_bytes + 1372), 75), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[106].base, 16, - g_static_metadata_bytes + 1422), + &g_static_metadata_slice_refcounts[40].base, 7, + g_static_metadata_bytes + 819), 76), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[40].base, 4, - g_static_metadata_bytes + 824), + &g_static_metadata_slice_refcounts[106].base, 16, + g_static_metadata_bytes + 1422), 77), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), + grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[41].base, 4, + g_static_metadata_bytes + 826), + 78), + StaticMetadata(grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[107].base, 13, g_static_metadata_bytes + 1438), - 78), + 79), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[108].base, 12, g_static_metadata_bytes + 1451), - 79), + 80), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[9].base, 20, - g_static_metadata_bytes + 88), + &g_static_metadata_slice_refcounts[10].base, 20, + g_static_metadata_bytes + 90), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[109].base, 21, g_static_metadata_bytes + 1463), - 80), - StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), - grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[101].base, 8, - g_static_metadata_bytes + 1380), 81), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[40].base, 4, - g_static_metadata_bytes + 824), + &g_static_metadata_slice_refcounts[100].base, 8, + g_static_metadata_bytes + 1372), 82), StaticMetadata(grpc_core::StaticMetadataSlice( - &g_static_metadata_slice_refcounts[15].base, 15, - g_static_metadata_bytes + 184), + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), + grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[41].base, 4, + g_static_metadata_bytes + 826), + 83), + StaticMetadata(grpc_core::StaticMetadataSlice( + &g_static_metadata_slice_refcounts[16].base, 15, + g_static_metadata_bytes + 186), grpc_core::StaticMetadataSlice( &g_static_metadata_slice_refcounts[107].base, 13, g_static_metadata_bytes + 1438), - 83), + 84), }; /* Warning: the core static metadata currently operates under the soft @@ -966,111 +973,115 @@ grpc_mdelem g_static_mdelem_manifested[GRPC_STATIC_MDELEM_COUNT] = { GRPC_MAKE_MDELEM( &g_static_mdelem_table[66].data(), GRPC_MDELEM_STORAGE_STATIC), + /* GRPC_MDELEM_TE_TRAILERS: + "te": "trailers" */ + GRPC_MAKE_MDELEM( + &g_static_mdelem_table[67].data(), + GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC: "content-type": "application/grpc" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[67].data(), + &g_static_mdelem_table[68].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_SCHEME_GRPC: ":scheme": "grpc" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[68].data(), + &g_static_mdelem_table[69].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_METHOD_PUT: ":method": "PUT" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[69].data(), + &g_static_mdelem_table[70].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_ACCEPT_ENCODING_EMPTY: "accept-encoding": "" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[70].data(), + &g_static_mdelem_table[71].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_CONTENT_ENCODING_IDENTITY: "content-encoding": "identity" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[71].data(), + &g_static_mdelem_table[72].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_CONTENT_ENCODING_GZIP: "content-encoding": "gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[72].data(), + &g_static_mdelem_table[73].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_LB_COST_BIN_EMPTY: "lb-cost-bin": "" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[73].data(), + &g_static_mdelem_table[74].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY: "grpc-accept-encoding": "identity" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[74].data(), + &g_static_mdelem_table[75].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE: "grpc-accept-encoding": "deflate" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[75].data(), + &g_static_mdelem_table[76].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE: "grpc-accept-encoding": "identity,deflate" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[76].data(), + &g_static_mdelem_table[77].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP: "grpc-accept-encoding": "gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[77].data(), + &g_static_mdelem_table[78].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP: "grpc-accept-encoding": "identity,gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[78].data(), + &g_static_mdelem_table[79].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP: "grpc-accept-encoding": "deflate,gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[79].data(), + &g_static_mdelem_table[80].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP: "grpc-accept-encoding": "identity,deflate,gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[80].data(), + &g_static_mdelem_table[81].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY: "accept-encoding": "identity" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[81].data(), + &g_static_mdelem_table[82].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_ACCEPT_ENCODING_GZIP: "accept-encoding": "gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[82].data(), + &g_static_mdelem_table[83].data(), GRPC_MDELEM_STORAGE_STATIC), /* GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP: "accept-encoding": "identity,gzip" */ GRPC_MAKE_MDELEM( - &g_static_mdelem_table[83].data(), + &g_static_mdelem_table[84].data(), GRPC_MDELEM_STORAGE_STATIC) // clang-format on }; } // namespace grpc_core uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4}; static const int8_t elems_r[] = { - 18, 11, -8, 0, 3, -75, -51, 0, 7, -4, 0, 0, 0, 12, -1, -2, - 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -50, 0, -55, -75, -76, -77, 0, - 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 28, 19, 18, 17, 16, 17, - 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, - 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, -11, 0}; + 15, 10, -8, 0, 2, -43, -83, -44, 0, 4, -8, 0, 0, 0, 10, 0, -7, 0, + 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -68, 0, -53, -56, -53, -77, 0, 30, 29, 28, 27, 26, 25, 24, 35, 22, + 21, 20, 19, 18, 17, 16, 15, 16, 16, 16, 15, 14, 13, 12, 11, 10, 9, 8, + 7, 6, 5, 4, 3, 2, 3, 2, 2, 6, 0, 0, 0, 0, 0, 0, -7, 0}; static uint32_t elems_phash(uint32_t i) { - i -= 46; + i -= 45; uint32_t x = i % 108; uint32_t y = i / 108; uint32_t h = x; @@ -1082,22 +1093,22 @@ static uint32_t elems_phash(uint32_t i) { } static const uint16_t elem_keys[] = { - 270, 271, 272, 273, 274, 275, 276, 1029, 1030, 1568, 1678, - 154, 155, 488, 489, 760, 919, 920, 46, 47, 1458, 1580, - 1690, 684, 685, 2008, 2118, 6628, 6738, 6848, 6958, 7068, 7178, - 7288, 7398, 7508, 7618, 7728, 7838, 7948, 1708, 8168, 8278, 8388, - 8498, 6518, 6298, 8608, 8058, 8718, 8828, 8938, 9048, 9158, 9268, - 9378, 9488, 9598, 9708, 9818, 9928, 10038, 10148, 10258, 10368, 10478, - 10588, 10698, 543, 1091, 10808, 214, 10918, 11578, 1096, 1097, 1098, - 1099, 981, 0, 0, 0, 1641, 1751, 0, 0, 0, 0, - 358, 1757, 0, 0, 0, 0, 1532}; + 269, 270, 271, 272, 273, 274, 275, 1140, 1141, 1789, 153, + 154, 487, 488, 1679, 45, 46, 1030, 1031, 795, 796, 1801, + 1569, 651, 869, 2119, 1691, 2229, 6189, 6739, 6849, 6959, 7069, + 7179, 7289, 7399, 7509, 1817, 7729, 7839, 7949, 8059, 8169, 8279, + 8389, 8499, 6519, 6409, 8609, 7619, 8719, 6629, 8829, 8939, 9049, + 9159, 9269, 9379, 9489, 9599, 9709, 9819, 9929, 10039, 10149, 10259, + 10369, 1200, 543, 10479, 10589, 214, 10699, 1206, 1207, 1208, 1209, + 1090, 10809, 11579, 1860, 0, 0, 0, 0, 1750, 0, 1867, + 0, 0, 359, 0, 0, 0, 0, 1642}; static const uint8_t elem_idxs[] = { - 7, 8, 9, 10, 11, 12, 13, 75, 77, 25, 70, 1, 2, 5, 6, 61, - 66, 65, 3, 4, 30, 72, 82, 62, 63, 57, 37, 17, 18, 19, 20, 21, - 22, 23, 24, 26, 27, 28, 29, 31, 15, 33, 34, 35, 36, 16, 14, 38, - 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 58, 68, 74, 59, 69, 60, 73, 76, 78, 79, 80, 64, 255, - 255, 255, 71, 81, 255, 255, 255, 255, 0, 83, 255, 255, 255, 255, 67}; + 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, + 4, 66, 65, 62, 63, 83, 30, 67, 61, 57, 73, 37, 14, 19, 20, 21, + 22, 23, 24, 26, 27, 15, 29, 31, 32, 33, 34, 35, 36, 38, 17, 16, + 39, 28, 40, 18, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 74, + 82, 255, 255, 255, 255, 72, 255, 84, 255, 255, 0, 255, 255, 255, 255, 68}; grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) { if (a == -1 || b == -1) return GRPC_MDNULL; @@ -1111,7 +1122,7 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) { : GRPC_MDNULL; } -const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 74, 75, 76, - 77, 78, 79, 80}; +const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 75, 76, 77, + 78, 79, 80, 81}; -const uint8_t grpc_static_accept_stream_encoding_metadata[4] = {0, 81, 82, 83}; +const uint8_t grpc_static_accept_stream_encoding_metadata[4] = {0, 82, 83, 84}; diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 8b5783e76df..1554f460a1e 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -34,7 +34,7 @@ #include "src/core/lib/slice/static_slice.h" #include "src/core/lib/transport/metadata.h" -#define GRPC_STATIC_MDELEM_COUNT 84 +#define GRPC_STATIC_MDELEM_COUNT 85 namespace grpc_core { extern StaticMetadata g_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; @@ -207,55 +207,57 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; /* "grpc-encoding": "deflate" */ #define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \ (::grpc_core::g_static_mdelem_manifested[66]) +/* "te": "trailers" */ +#define GRPC_MDELEM_TE_TRAILERS (::grpc_core::g_static_mdelem_manifested[67]) /* "content-type": "application/grpc" */ #define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \ - (::grpc_core::g_static_mdelem_manifested[67]) + (::grpc_core::g_static_mdelem_manifested[68]) /* ":scheme": "grpc" */ -#define GRPC_MDELEM_SCHEME_GRPC (::grpc_core::g_static_mdelem_manifested[68]) +#define GRPC_MDELEM_SCHEME_GRPC (::grpc_core::g_static_mdelem_manifested[69]) /* ":method": "PUT" */ -#define GRPC_MDELEM_METHOD_PUT (::grpc_core::g_static_mdelem_manifested[69]) +#define GRPC_MDELEM_METHOD_PUT (::grpc_core::g_static_mdelem_manifested[70]) /* "accept-encoding": "" */ #define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \ - (::grpc_core::g_static_mdelem_manifested[70]) + (::grpc_core::g_static_mdelem_manifested[71]) /* "content-encoding": "identity" */ #define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY \ - (::grpc_core::g_static_mdelem_manifested[71]) + (::grpc_core::g_static_mdelem_manifested[72]) /* "content-encoding": "gzip" */ #define GRPC_MDELEM_CONTENT_ENCODING_GZIP \ - (::grpc_core::g_static_mdelem_manifested[72]) + (::grpc_core::g_static_mdelem_manifested[73]) /* "lb-cost-bin": "" */ #define GRPC_MDELEM_LB_COST_BIN_EMPTY \ - (::grpc_core::g_static_mdelem_manifested[73]) + (::grpc_core::g_static_mdelem_manifested[74]) /* "grpc-accept-encoding": "identity" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \ - (::grpc_core::g_static_mdelem_manifested[74]) + (::grpc_core::g_static_mdelem_manifested[75]) /* "grpc-accept-encoding": "deflate" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \ - (::grpc_core::g_static_mdelem_manifested[75]) + (::grpc_core::g_static_mdelem_manifested[76]) /* "grpc-accept-encoding": "identity,deflate" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \ - (::grpc_core::g_static_mdelem_manifested[76]) + (::grpc_core::g_static_mdelem_manifested[77]) /* "grpc-accept-encoding": "gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \ - (::grpc_core::g_static_mdelem_manifested[77]) + (::grpc_core::g_static_mdelem_manifested[78]) /* "grpc-accept-encoding": "identity,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ - (::grpc_core::g_static_mdelem_manifested[78]) + (::grpc_core::g_static_mdelem_manifested[79]) /* "grpc-accept-encoding": "deflate,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \ - (::grpc_core::g_static_mdelem_manifested[79]) + (::grpc_core::g_static_mdelem_manifested[80]) /* "grpc-accept-encoding": "identity,deflate,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (::grpc_core::g_static_mdelem_manifested[80]) + (::grpc_core::g_static_mdelem_manifested[81]) /* "accept-encoding": "identity" */ #define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY \ - (::grpc_core::g_static_mdelem_manifested[81]) + (::grpc_core::g_static_mdelem_manifested[82]) /* "accept-encoding": "gzip" */ #define GRPC_MDELEM_ACCEPT_ENCODING_GZIP \ - (::grpc_core::g_static_mdelem_manifested[82]) + (::grpc_core::g_static_mdelem_manifested[83]) /* "accept-encoding": "identity,gzip" */ #define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ - (::grpc_core::g_static_mdelem_manifested[83]) + (::grpc_core::g_static_mdelem_manifested[84]) grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b); typedef enum { @@ -264,6 +266,7 @@ typedef enum { GRPC_BATCH_STATUS, GRPC_BATCH_AUTHORITY, GRPC_BATCH_SCHEME, + GRPC_BATCH_TE, GRPC_BATCH_GRPC_MESSAGE, GRPC_BATCH_GRPC_STATUS, GRPC_BATCH_GRPC_PAYLOAD_BIN, @@ -293,6 +296,7 @@ typedef union { struct grpc_linked_mdelem* status; struct grpc_linked_mdelem* authority; struct grpc_linked_mdelem* scheme; + struct grpc_linked_mdelem* te; struct grpc_linked_mdelem* grpc_message; struct grpc_linked_mdelem* grpc_status; struct grpc_linked_mdelem* grpc_payload_bin; diff --git a/src/core/lib/transport/transport_op_string.cc b/src/core/lib/transport/transport_op_string.cc index 230d43e4e49..253563b4495 100644 --- a/src/core/lib/transport/transport_op_string.cc +++ b/src/core/lib/transport/transport_op_string.cc @@ -40,46 +40,37 @@ /* These routines are here to facilitate debugging - they produce string representations of various transport data structures */ -namespace { -class MetadataListEncoder { - public: - explicit MetadataListEncoder(std::vector* out) : out_(out) {} - void Encode(const grpc_mdelem& md) { - MaybeAddComma(); - out_->push_back("key="); - char* dump = grpc_dump_slice(GRPC_MDKEY(md), GPR_DUMP_HEX | GPR_DUMP_ASCII); - out_->push_back(dump); - gpr_free(dump); - out_->push_back(" value="); - dump = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_HEX | GPR_DUMP_ASCII); - out_->push_back(dump); - gpr_free(dump); - } - - void Encode(grpc_core::GrpcTimeoutMetadata, grpc_millis deadline) { - MaybeAddComma(); - out_->push_back(absl::StrFormat("deadline=%" PRId64, deadline)); - } - - template - void Encode(Which, typename Which::ValueType value) { - MaybeAddComma(); - out_->push_back( - absl::StrCat(Which::key(), "=", Which::DisplayValue(value))); - } - - private: - void MaybeAddComma() { - if (out_->size() != initial_size_) out_->push_back(", "); - } - std::vector* const out_; - const size_t initial_size_ = out_->size(); -}; -} // namespace - static void put_metadata_list(const grpc_metadata_batch& md, std::vector* out) { - MetadataListEncoder encoder(out); + class Encoder { + public: + explicit Encoder(std::vector* out) : out_(out) {} + void Encode(const grpc_mdelem& md) { + MaybeAddComma(); + out_->push_back("key="); + char* dump = + grpc_dump_slice(GRPC_MDKEY(md), GPR_DUMP_HEX | GPR_DUMP_ASCII); + out_->push_back(dump); + gpr_free(dump); + out_->push_back(" value="); + dump = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_HEX | GPR_DUMP_ASCII); + out_->push_back(dump); + gpr_free(dump); + } + + void Encode(grpc_core::GrpcTimeoutMetadata, grpc_millis deadline) { + MaybeAddComma(); + out_->push_back(absl::StrFormat("deadline=%" PRId64, deadline)); + } + + private: + void MaybeAddComma() { + if (out_->size() != initial_size_) out_->push_back(", "); + } + std::vector* const out_; + const size_t initial_size_ = out_->size(); + }; + Encoder encoder(out); md.Encode(&encoder); } diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 0bad6e63bf8..f6f3d4ccbd7 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -4,6 +4,7 @@ "\x07:status" "\x0A:authority" "\x07:scheme" +"\x02te" "\x0Cgrpc-message" "\x0Bgrpc-status" "\x10grpc-payload-bin" @@ -41,8 +42,6 @@ "\x07deflate" "\x04gzip" "\x0Bstream/gzip" -"\x02te" -"\x08trailers" "\x03GET" "\x04POST" "\x01/" @@ -101,6 +100,7 @@ "\x10www-authenticate" "\x010" "\x08identity" +"\x08trailers" "\x10application/grpc" "\x04grpc" "\x03PUT" @@ -176,6 +176,7 @@ "\x00\x0Dgrpc-encoding\x08identity" "\x00\x0Dgrpc-encoding\x04gzip" "\x00\x0Dgrpc-encoding\x07deflate" +"\x00\x02te\x08trailers" "\x00\x0Ccontent-type\x10application/grpc" "\x00\x07:scheme\x04grpc" "\x00\x07:method\x03PUT" diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 529f41eeb7c..817b465baec 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -111,9 +111,14 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State& state) { grpc_core::ExecCtx exec_ctx; static bool logged_representative_output = false; + std::vector elems = Fixture::GetElems(); + std::vector storage(elems.size()); auto arena = grpc_core::MakeScopedArena(1024); grpc_metadata_batch b(arena.get()); - Fixture::Prepare(&b); + for (size_t i = 0; i < elems.size(); i++) { + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "addmd", grpc_metadata_batch_add_tail(&b, &storage[i], elems[i]))); + } grpc_core::HPackCompressor c; grpc_transport_one_way_stats stats; @@ -160,28 +165,24 @@ namespace hpack_encoder_fixtures { class EmptyBatch { public: static constexpr bool kEnableTrueBinary = false; - static void Prepare(grpc_metadata_batch*) {} + static std::vector GetElems() { return {}; } }; class SingleStaticElem { public: static constexpr bool kEnableTrueBinary = false; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE))); + static std::vector GetElems() { + return {GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE}; } }; class SingleInternedElem { public: static constexpr bool kEnableTrueBinary = false; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_string("abc")), - grpc_slice_intern(grpc_slice_from_static_string("def")))))); + static std::vector GetElems() { + return {grpc_mdelem_from_slices( + grpc_slice_intern(grpc_slice_from_static_string("abc")), + grpc_slice_intern(grpc_slice_from_static_string("def")))}; } }; @@ -189,14 +190,13 @@ template class SingleInternedBinaryElem { public: static constexpr bool kEnableTrueBinary = kTrueBinary; - static void Prepare(grpc_metadata_batch* b) { + static std::vector GetElems() { grpc_slice bytes = MakeBytes(); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_string("abc-bin")), - grpc_slice_intern(bytes))))); + std::vector out = {grpc_mdelem_from_slices( + grpc_slice_intern(grpc_slice_from_static_string("abc-bin")), + grpc_slice_intern(bytes))}; grpc_slice_unref(bytes); + return out; } private: @@ -213,22 +213,19 @@ class SingleInternedBinaryElem { class SingleInternedKeyElem { public: static constexpr bool kEnableTrueBinary = false; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - grpc_slice_intern(grpc_slice_from_static_string("abc")), - grpc_slice_from_static_string("def"))))); + static std::vector GetElems() { + return {grpc_mdelem_from_slices( + grpc_slice_intern(grpc_slice_from_static_string("abc")), + grpc_slice_from_static_string("def"))}; } }; class SingleNonInternedElem { public: static constexpr bool kEnableTrueBinary = false; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT( - GRPC_LOG_IF_ERROR("addmd", b->Append(grpc_mdelem_from_slices( - grpc_slice_from_static_string("abc"), - grpc_slice_from_static_string("def"))))); + static std::vector GetElems() { + return {grpc_mdelem_from_slices(grpc_slice_from_static_string("abc"), + grpc_slice_from_static_string("def"))}; } }; @@ -236,10 +233,9 @@ template class SingleNonInternedBinaryElem { public: static constexpr bool kEnableTrueBinary = kTrueBinary; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - grpc_slice_from_static_string("abc-bin"), MakeBytes())))); + static std::vector GetElems() { + return {grpc_mdelem_from_slices(grpc_slice_from_static_string("abc-bin"), + MakeBytes())}; } private: @@ -256,31 +252,23 @@ class SingleNonInternedBinaryElem { class RepresentativeClientInitialMetadata { public: static constexpr bool kEnableTrueBinary = true; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_SCHEME_HTTP))); - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_METHOD_POST))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( + static std::vector GetElems() { + return { + GRPC_MDELEM_SCHEME_HTTP, + GRPC_MDELEM_METHOD_POST, + grpc_mdelem_from_slices( GRPC_MDSTR_PATH, - grpc_slice_intern(grpc_slice_from_static_string("/foo/bar")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_AUTHORITY, - grpc_slice_intern(grpc_slice_from_static_string( - "foo.test.google.fr:1234")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append( - GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP))); - b->Set(grpc_core::TeMetadata(), grpc_core::TeMetadata::kTrailers); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_USER_AGENT, - grpc_slice_intern(grpc_slice_from_static_string( - "grpc-c/3.0.0-dev (linux; chttp2; green)")))))); + grpc_slice_intern(grpc_slice_from_static_string("/foo/bar"))), + grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, + grpc_slice_intern(grpc_slice_from_static_string( + "foo.test.google.fr:1234"))), + GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP, + GRPC_MDELEM_TE_TRAILERS, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC, + grpc_mdelem_from_slices( + GRPC_MDSTR_USER_AGENT, + grpc_slice_intern(grpc_slice_from_static_string( + "grpc-c/3.0.0-dev (linux; chttp2; green)")))}; } }; @@ -290,22 +278,17 @@ class RepresentativeClientInitialMetadata { class MoreRepresentativeClientInitialMetadata { public: static constexpr bool kEnableTrueBinary = true; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_SCHEME_HTTP))); - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_METHOD_POST))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_PATH, grpc_slice_intern(grpc_slice_from_static_string( - "/grpc.test.FooService/BarMethod")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_AUTHORITY, - grpc_slice_intern(grpc_slice_from_static_string( - "foo.test.google.fr:1234")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( + static std::vector GetElems() { + return { + GRPC_MDELEM_SCHEME_HTTP, + GRPC_MDELEM_METHOD_POST, + grpc_mdelem_from_slices(GRPC_MDSTR_PATH, + grpc_slice_intern(grpc_slice_from_static_string( + "/grpc.test.FooService/BarMethod"))), + grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, + grpc_slice_intern(grpc_slice_from_static_string( + "foo.test.google.fr:1234"))), + grpc_mdelem_from_slices( GRPC_MDSTR_GRPC_TRACE_BIN, grpc_slice_from_static_string("\x00\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0f" @@ -313,49 +296,37 @@ class MoreRepresentativeClientInitialMetadata { "\x19\x1a\x1b\x1c\x1d\x1e\x1f" "\x20\x21\x22\x23\x24\x25\x26\x27\x28" "\x29\x2a\x2b\x2c\x2d\x2e\x2f" - "\x30"))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( + "\x30")), + grpc_mdelem_from_slices( GRPC_MDSTR_GRPC_TAGS_BIN, grpc_slice_from_static_string("\x00\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13"))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append( - GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP))); - b->Set(grpc_core::TeMetadata(), grpc_core::TeMetadata::kTrailers); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_USER_AGENT, - grpc_slice_intern(grpc_slice_from_static_string( - "grpc-c/3.0.0-dev (linux; chttp2; green)")))))); + "\x10\x11\x12\x13")), + GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP, + GRPC_MDELEM_TE_TRAILERS, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC, + grpc_mdelem_from_slices( + GRPC_MDSTR_USER_AGENT, + grpc_slice_intern(grpc_slice_from_static_string( + "grpc-c/3.0.0-dev (linux; chttp2; green)")))}; } }; class RepresentativeServerInitialMetadata { public: static constexpr bool kEnableTrueBinary = true; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_STATUS_200))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append( - GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP))); + static std::vector GetElems() { + return {GRPC_MDELEM_STATUS_200, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC, + GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP}; } }; class RepresentativeServerTrailingMetadata { public: static constexpr bool kEnableTrueBinary = true; - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT( - GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_GRPC_STATUS_0))); + static std::vector GetElems() { + return {GRPC_MDELEM_GRPC_STATUS_0}; } }; diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index 7aaa338f58c..1b6e2b11845 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -287,31 +287,23 @@ BENCHMARK(BM_StreamCreateDestroy); class RepresentativeClientInitialMetadata { public: - static void Prepare(grpc_metadata_batch* b) { - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_SCHEME_HTTP))); - GPR_ASSERT(GRPC_LOG_IF_ERROR("addmd", b->Append(GRPC_MDELEM_METHOD_POST))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_PATH, grpc_slice_intern(grpc_slice_from_static_string( - "/foo/bar/bm_chttp2_transport")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_AUTHORITY, - grpc_slice_intern(grpc_slice_from_static_string( - "foo.test.google.fr:1234")))))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", - b->Append( - GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP))); - b->Set(grpc_core::TeMetadata(), grpc_core::TeMetadata::kTrailers); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC))); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "addmd", b->Append(grpc_mdelem_from_slices( - GRPC_MDSTR_USER_AGENT, - grpc_slice_intern(grpc_slice_from_static_string( - "grpc-c/3.0.0-dev (linux; chttp2; green)")))))); + static std::vector GetElems() { + return { + GRPC_MDELEM_SCHEME_HTTP, + GRPC_MDELEM_METHOD_POST, + grpc_mdelem_from_slices(GRPC_MDSTR_PATH, + grpc_slice_intern(grpc_slice_from_static_string( + "/foo/bar/bm_chttp2_transport"))), + grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, + grpc_slice_intern(grpc_slice_from_static_string( + "foo.test.google.fr:1234"))), + GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP, + GRPC_MDELEM_TE_TRAILERS, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC, + grpc_mdelem_from_slices( + GRPC_MDSTR_USER_AGENT, + grpc_slice_intern(grpc_slice_from_static_string( + "grpc-c/3.0.0-dev (linux; chttp2; green)")))}; } }; @@ -332,8 +324,13 @@ static void BM_StreamCreateSendInitialMetadataDestroy(benchmark::State& state) { }; auto arena = grpc_core::MakeScopedArena(1024); + std::vector elems = Metadata::GetElems(); + std::vector storage(elems.size()); grpc_metadata_batch b(arena.get()); - Metadata::Prepare(&b); + for (size_t i = 0; i < elems.size(); i++) { + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "addmd", grpc_metadata_batch_add_tail(&b, &storage[i], elems[i]))); + } f.FlushExecCtx(); gpr_event bm_done; @@ -428,9 +425,15 @@ static void BM_TransportStreamSend(benchmark::State& state) { grpc_slice send_slice = grpc_slice_malloc_large(state.range(0)); memset(GRPC_SLICE_START_PTR(send_slice), 0, GRPC_SLICE_LENGTH(send_slice)); grpc_core::ManualConstructor send_stream; + std::vector elems = + RepresentativeClientInitialMetadata::GetElems(); + std::vector storage(elems.size()); auto arena = grpc_core::MakeScopedArena(1024); grpc_metadata_batch b(arena.get()); - RepresentativeClientInitialMetadata::Prepare(&b); + for (size_t i = 0; i < elems.size(); i++) { + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "addmd", grpc_metadata_batch_add_tail(&b, &storage[i], elems[i]))); + } gpr_event* bm_done = new gpr_event; gpr_event_init(bm_done); @@ -563,8 +566,14 @@ static void BM_TransportStreamRecv(benchmark::State& state) { }; auto arena = grpc_core::MakeScopedArena(1024); + std::vector elems = + RepresentativeClientInitialMetadata::GetElems(); + std::vector storage(elems.size()); grpc_metadata_batch b(arena.get()); - RepresentativeClientInitialMetadata::Prepare(&b); + for (size_t i = 0; i < elems.size(); i++) { + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "addmd", grpc_metadata_batch_add_tail(&b, &storage[i], elems[i]))); + } std::unique_ptr do_nothing = MakeTestClosure([](grpc_error_handle /*error*/) {}); diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index a1d50f06fd9..f588e6ad6b1 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -74,9 +74,6 @@ CONFIG = [ 'deflate', 'gzip', 'stream/gzip', - # te: trailers strings - 'te', - 'trailers', # metadata elements # begin hpack static elements (':authority', ''), @@ -147,6 +144,7 @@ CONFIG = [ ('grpc-encoding', 'identity'), ('grpc-encoding', 'gzip'), ('grpc-encoding', 'deflate'), + ('te', 'trailers'), ('content-type', 'application/grpc'), (':scheme', 'grpc'), (':method', 'PUT'), @@ -164,6 +162,7 @@ METADATA_BATCH_CALLOUTS = [ ':status', ':authority', ':scheme', + 'te', 'grpc-message', 'grpc-status', 'grpc-payload-bin',