diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/lb_policy/grpclb/grpclb.c | 14 | ||||
-rw-r--r-- | src/core/ext/load_reporting/load_reporting_filter.c | 66 | ||||
-rw-r--r-- | src/core/lib/channel/compress_filter.c | 94 | ||||
-rw-r--r-- | src/core/lib/channel/http_client_filter.c | 200 | ||||
-rw-r--r-- | src/core/lib/channel/http_server_filter.c | 299 | ||||
-rw-r--r-- | src/core/lib/iomgr/error.c | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/error.h | 6 | ||||
-rw-r--r-- | src/core/lib/security/transport/client_auth_filter.c | 20 | ||||
-rw-r--r-- | src/core/lib/security/transport/server_auth_filter.c | 8 | ||||
-rw-r--r-- | src/core/lib/surface/call.c | 89 | ||||
-rw-r--r-- | src/core/lib/surface/server.c | 34 | ||||
-rw-r--r-- | src/core/lib/transport/metadata_batch.c | 167 | ||||
-rw-r--r-- | src/core/lib/transport/metadata_batch.h | 55 | ||||
-rw-r--r-- | src/core/lib/transport/static_metadata.c | 817 | ||||
-rw-r--r-- | src/core/lib/transport/static_metadata.h | 632 |
15 files changed, 1331 insertions, 1174 deletions
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index ebb3f8044b..ab4af321f6 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -133,13 +133,13 @@ int grpc_lb_glb_trace = 0; /* add lb_token of selected subchannel (address) to the call's initial * metadata */ -static void initial_metadata_add_lb_token( +static grpc_error *initial_metadata_add_lb_token( grpc_metadata_batch *initial_metadata, grpc_linked_mdelem *lb_token_mdelem_storage, grpc_mdelem lb_token) { GPR_ASSERT(lb_token_mdelem_storage != NULL); GPR_ASSERT(!GRPC_MDISNULL(lb_token)); - grpc_metadata_batch_add_tail(initial_metadata, lb_token_mdelem_storage, - lb_token); + return grpc_metadata_batch_add_tail(initial_metadata, lb_token_mdelem_storage, + lb_token); } typedef struct wrapped_rr_closure_arg { @@ -188,9 +188,11 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, * available */ if (wc_arg->target != NULL) { if (!GRPC_MDISNULL(wc_arg->lb_token)) { - initial_metadata_add_lb_token(wc_arg->initial_metadata, - wc_arg->lb_token_mdelem_storage, - GRPC_MDELEM_REF(wc_arg->lb_token)); + GRPC_LOG_IF_ERROR( + "grpclb.initial_metadata_add_lb_token", + initial_metadata_add_lb_token(wc_arg->initial_metadata, + wc_arg->lb_token_mdelem_storage, + GRPC_MDELEM_REF(wc_arg->lb_token))); } else { gpr_log(GPR_ERROR, "No LB token for connected subchannel pick %p (from RR " diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 75f5c73ae3..6f5dacacbb 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -67,44 +67,28 @@ typedef struct channel_data { intptr_t id; /**< an id unique to the channel */ } channel_data; -typedef struct { - grpc_call_element *elem; - grpc_exec_ctx *exec_ctx; -} recv_md_filter_args; - -static grpc_mdelem recv_md_filter(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem md) { - recv_md_filter_args *a = user_data; - grpc_call_element *elem = a->elem; - call_data *calld = elem->call_data; - - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_PATH)) { - calld->service_method = grpc_slice_ref_internal(GRPC_MDVALUE(md)); - calld->have_service_method = true; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_LB_TOKEN)) { - calld->initial_md_string = grpc_slice_ref_internal(GRPC_MDVALUE(md)); - calld->have_initial_md_string = true; - return GRPC_MDNULL; - } - - return md; -} - static void on_initial_md_ready(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *err) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; if (err == GRPC_ERROR_NONE) { - recv_md_filter_args a; - a.elem = elem; - a.exec_ctx = exec_ctx; - grpc_metadata_batch_filter(exec_ctx, calld->recv_initial_metadata, - recv_md_filter, &a); - if (!calld->have_service_method) { + if (calld->recv_initial_metadata->idx.named.path != NULL) { + calld->service_method = grpc_slice_ref_internal( + GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.path->md)); + calld->have_service_method = true; + } else { err = grpc_error_add_child(err, GRPC_ERROR_CREATE("Missing :path header")); } + if (calld->recv_initial_metadata->idx.named.lb_token != NULL) { + calld->initial_md_string = grpc_slice_ref_internal( + GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.lb_token->md)); + calld->have_initial_md_string = true; + grpc_metadata_batch_remove( + calld->recv_initial_metadata, + calld->recv_initial_metadata->idx.named.lb_token); + } } else { GRPC_ERROR_REF(err); } @@ -196,20 +180,6 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, */ } -static grpc_mdelem lr_trailing_md_filter(grpc_exec_ctx *exec_ctx, - void *user_data, grpc_mdelem md) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_LB_COST_BIN)) { - calld->trailing_md_string = grpc_slice_ref_internal(GRPC_MDVALUE(md)); - calld->have_trailing_md_string = true; - return GRPC_MDNULL; - } - - return md; -} - static void lr_start_transport_stream_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_transport_stream_op *op) { @@ -222,8 +192,14 @@ static void lr_start_transport_stream_op(grpc_exec_ctx *exec_ctx, calld->ops_recv_initial_metadata_ready = op->recv_initial_metadata_ready; op->recv_initial_metadata_ready = &calld->on_initial_md_ready; } else if (op->send_trailing_metadata) { - grpc_metadata_batch_filter(exec_ctx, op->send_trailing_metadata, - lr_trailing_md_filter, elem); + if (op->send_trailing_metadata->idx.named.lb_cost_bin != NULL) { + calld->trailing_md_string = grpc_slice_ref_internal( + GRPC_MDVALUE(op->send_trailing_metadata->idx.named.lb_cost_bin->md)); + calld->have_trailing_md_string = true; + grpc_metadata_batch_remove( + op->send_trailing_metadata, + op->send_trailing_metadata->idx.named.lb_cost_bin); + } } grpc_call_next_op(exec_ctx, elem, op); diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 392d4d7231..706c8df90c 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -81,42 +81,6 @@ typedef struct channel_data { uint32_t supported_compression_algorithms; } channel_data; -/** For each \a md element from the incoming metadata, filter out the entry for - * "grpc-encoding", using its value to populate the call data's - * compression_algorithm field. */ -static grpc_mdelem compression_md_filter(grpc_exec_ctx *exec_ctx, - void *user_data, grpc_mdelem md) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - channel_data *channeld = elem->channel_data; - - if (grpc_slice_eq(GRPC_MDKEY(md), - GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST)) { - if (!grpc_compression_algorithm_parse(GRPC_MDVALUE(md), - &calld->compression_algorithm)) { - char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_log(GPR_ERROR, - "Invalid compression algorithm: '%s' (unknown). Ignoring.", val); - gpr_free(val); - calld->compression_algorithm = GRPC_COMPRESS_NONE; - } - if (!GPR_BITGET(channeld->enabled_algorithms_bitset, - calld->compression_algorithm)) { - char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_log(GPR_ERROR, - "Invalid compression algorithm: '%s' (previously disabled). " - "Ignoring.", - val); - gpr_free(val); - calld->compression_algorithm = GRPC_COMPRESS_NONE; - } - calld->has_compression_algorithm = 1; - return GRPC_MDNULL; - } - - return md; -} - static int skip_compression(grpc_call_element *elem, uint32_t flags) { call_data *calld = elem->call_data; channel_data *channeld = elem->channel_data; @@ -135,32 +99,65 @@ static int skip_compression(grpc_call_element *elem, uint32_t flags) { } /** Filter initial metadata */ -static void process_send_initial_metadata( +static grpc_error *process_send_initial_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_metadata_batch *initial_metadata) GRPC_MUST_USE_RESULT; +static grpc_error *process_send_initial_metadata( grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_metadata_batch *initial_metadata) { + grpc_error *error; call_data *calld = elem->call_data; channel_data *channeld = elem->channel_data; /* Parse incoming request for compression. If any, it'll be available * at calld->compression_algorithm */ - grpc_metadata_batch_filter(exec_ctx, initial_metadata, compression_md_filter, - elem); - if (!calld->has_compression_algorithm) { + if (initial_metadata->idx.named.grpc_internal_encoding_request != NULL) { + grpc_mdelem md = + initial_metadata->idx.named.grpc_internal_encoding_request->md; + if (!grpc_compression_algorithm_parse(GRPC_MDVALUE(md), + &calld->compression_algorithm)) { + char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); + gpr_log(GPR_ERROR, + "Invalid compression algorithm: '%s' (unknown). Ignoring.", val); + gpr_free(val); + calld->compression_algorithm = GRPC_COMPRESS_NONE; + } + if (!GPR_BITGET(channeld->enabled_algorithms_bitset, + calld->compression_algorithm)) { + char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); + gpr_log(GPR_ERROR, + "Invalid compression algorithm: '%s' (previously disabled). " + "Ignoring.", + val); + gpr_free(val); + calld->compression_algorithm = GRPC_COMPRESS_NONE; + } + calld->has_compression_algorithm = 1; + + grpc_metadata_batch_remove( + initial_metadata, + initial_metadata->idx.named.grpc_internal_encoding_request); + } else { /* If no algorithm was found in the metadata and we aren't * exceptionally skipping compression, fall back to the channel * default */ calld->compression_algorithm = channeld->default_compression_algorithm; calld->has_compression_algorithm = 1; /* GPR_TRUE */ } + /* hint compression algorithm */ - grpc_metadata_batch_add_tail( + error = grpc_metadata_batch_add_tail( initial_metadata, &calld->compression_algorithm_storage, grpc_compression_encoding_mdelem(calld->compression_algorithm)); + if (error != GRPC_ERROR_NONE) return error; + /* convey supported compression algorithms */ - grpc_metadata_batch_add_tail(initial_metadata, - &calld->accept_encoding_storage, - GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS( - channeld->supported_compression_algorithms)); + error = grpc_metadata_batch_add_tail( + initial_metadata, &calld->accept_encoding_storage, + GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS( + channeld->supported_compression_algorithms)); + + return error; } static void continue_send_message(grpc_exec_ctx *exec_ctx, @@ -251,7 +248,12 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("compress_start_transport_stream_op", 0); if (op->send_initial_metadata) { - process_send_initial_metadata(exec_ctx, elem, op->send_initial_metadata); + grpc_error *error = process_send_initial_metadata( + exec_ctx, elem, op->send_initial_metadata); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); + return; + } } if (op->send_message != NULL && !skip_compression(elem, op->send_message->flags)) { diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index e415877eb8..4593a9cb6d 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -94,74 +94,91 @@ typedef struct channel_data { size_t max_payload_size_for_get; } channel_data; -static grpc_mdelem client_recv_filter(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem md) { - grpc_call_element *elem = user_data; - if (grpc_mdelem_eq(md, GRPC_MDELEM_STATUS_200)) { - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_STATUS)) { - char *message_string; - char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_asprintf(&message_string, "Received http2 header with status: %s", val); - grpc_slice message = grpc_slice_from_copied_string(message_string); - gpr_free(message_string); - gpr_free(val); - grpc_call_element_send_close_with_message(exec_ctx, elem, - GRPC_STATUS_CANCELLED, &message); - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_GRPC_MESSAGE)) { - grpc_slice pct_decoded_msg = - grpc_permissive_percent_decode_slice(GRPC_MDVALUE(md)); - if (grpc_slice_is_equivalent(pct_decoded_msg, GRPC_MDVALUE(md))) { - grpc_slice_unref(pct_decoded_msg); - return md; +static grpc_error *client_filter_incoming_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_metadata_batch *b) { + if (b->idx.named.status != NULL) { + if (grpc_mdelem_eq(b->idx.named.status->md, GRPC_MDELEM_STATUS_200)) { + grpc_metadata_batch_remove(b, b->idx.named.status); } else { - return grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_GRPC_MESSAGE, - pct_decoded_msg); + char *val = grpc_dump_slice(GRPC_MDVALUE(b->idx.named.status->md), + GPR_DUMP_ASCII); + grpc_error *e = grpc_error_set_str( + GRPC_ERROR_CREATE( + "Received http2 :status header with non-200 OK status"), + GRPC_ERROR_STR_VALUE, val); + gpr_free(val); + return e; } - } else if (grpc_mdelem_eq(md, - GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC)) { - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_CONTENT_TYPE)) { - if (grpc_slice_buf_start_eq(GRPC_MDVALUE(md), EXPECTED_CONTENT_TYPE, - EXPECTED_CONTENT_TYPE_LENGTH) && - (GRPC_SLICE_START_PTR(GRPC_MDVALUE(md))[EXPECTED_CONTENT_TYPE_LENGTH] == - '+' || - GRPC_SLICE_START_PTR(GRPC_MDVALUE(md))[EXPECTED_CONTENT_TYPE_LENGTH] == - ';')) { - /* Although the C implementation doesn't (currently) generate them, - any custom +-suffix is explicitly valid. */ - /* TODO(klempner): We should consider preallocating common values such - as +proto or +json, or at least stashing them if we see them. */ - /* TODO(klempner): Should we be surfacing this to application code? */ + } + + if (b->idx.named.grpc_message != NULL) { + grpc_slice pct_decoded_msg = grpc_permissive_percent_decode_slice( + GRPC_MDVALUE(b->idx.named.grpc_message->md)); + if (grpc_slice_is_equivalent(pct_decoded_msg, + GRPC_MDVALUE(b->idx.named.grpc_message->md))) { + grpc_slice_unref(pct_decoded_msg); } else { - /* TODO(klempner): We're currently allowing this, but we shouldn't - see it without a proxy so log for now. */ - char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_log(GPR_INFO, "Unexpected content-type '%s'", val); - gpr_free(val); + grpc_metadata_batch_set_value(exec_ctx, b->idx.named.grpc_message, + pct_decoded_msg); } - return GRPC_MDNULL; } - return md; + + if (b->idx.named.content_type != NULL) { + if (!grpc_mdelem_eq(b->idx.named.content_type->md, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC)) { + if (grpc_slice_buf_start_eq(GRPC_MDVALUE(b->idx.named.content_type->md), + EXPECTED_CONTENT_TYPE, + EXPECTED_CONTENT_TYPE_LENGTH) && + (GRPC_SLICE_START_PTR(GRPC_MDVALUE( + b->idx.named.content_type->md))[EXPECTED_CONTENT_TYPE_LENGTH] == + '+' || + GRPC_SLICE_START_PTR(GRPC_MDVALUE( + b->idx.named.content_type->md))[EXPECTED_CONTENT_TYPE_LENGTH] == + ';')) { + /* Although the C implementation doesn't (currently) generate them, + any custom +-suffix is explicitly valid. */ + /* TODO(klempner): We should consider preallocating common values such + as +proto or +json, or at least stashing them if we see them. */ + /* TODO(klempner): Should we be surfacing this to application code? */ + } else { + /* TODO(klempner): We're currently allowing this, but we shouldn't + see it without a proxy so log for now. */ + char *val = grpc_dump_slice(GRPC_MDVALUE(b->idx.named.content_type->md), + GPR_DUMP_ASCII); + gpr_log(GPR_INFO, "Unexpected content-type '%s'", val); + gpr_free(val); + } + } + grpc_metadata_batch_remove(b, b->idx.named.content_type); + } + + return GRPC_ERROR_NONE; } static void hc_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; - grpc_metadata_batch_filter(exec_ctx, calld->recv_initial_metadata, - client_recv_filter, elem); - grpc_closure_run(exec_ctx, calld->on_done_recv_initial_metadata, - GRPC_ERROR_REF(error)); + if (error == GRPC_ERROR_NONE) { + error = client_filter_incoming_metadata(exec_ctx, elem, + calld->recv_initial_metadata); + } else { + GRPC_ERROR_REF(error); + } + grpc_closure_run(exec_ctx, calld->on_done_recv_initial_metadata, error); } static void hc_on_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; - grpc_metadata_batch_filter(exec_ctx, calld->recv_trailing_metadata, - client_recv_filter, elem); + if (error == GRPC_ERROR_NONE) { + error = client_filter_incoming_metadata(exec_ctx, elem, + calld->recv_trailing_metadata); + } else { + GRPC_ERROR_REF(error); + } grpc_closure_run(exec_ctx, calld->on_done_recv_trailing_metadata, GRPC_ERROR_REF(error)); } @@ -184,16 +201,11 @@ static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } -static grpc_mdelem client_strip_filter(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem md) { - /* eat the things we'd like to set ourselves */ - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_METHOD)) return GRPC_MDNULL; - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_SCHEME)) return GRPC_MDNULL; - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_TE)) return GRPC_MDNULL; - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_CONTENT_TYPE)) - return GRPC_MDNULL; - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_USER_AGENT)) return GRPC_MDNULL; - return md; +static void remove_if_present(grpc_metadata_batch *batch, + grpc_metadata_batch_callouts_index idx) { + if (batch->idx.array[idx] != NULL) { + grpc_metadata_batch_remove(batch, batch->idx.array[idx]); + } } static void continue_send_message(grpc_exec_ctx *exec_ctx, @@ -232,11 +244,13 @@ static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { } } -static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_transport_stream_op *op) { +static grpc_error *hc_mutate_op(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op *op) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; channel_data *channeld = elem->channel_data; + grpc_error *error; if (op->send_initial_metadata != NULL) { /* Decide which HTTP VERB to use. We use GET if the request is marked @@ -274,8 +288,9 @@ static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, exec_ctx, GRPC_MDSTR_GRPC_PAYLOAD_BIN, grpc_slice_from_copied_buffer((const char *)calld->payload_bytes, op->send_message->length)); - grpc_metadata_batch_add_tail(op->send_initial_metadata, - &calld->payload_bin, payload_bin); + error = grpc_metadata_batch_add_tail(op->send_initial_metadata, + &calld->payload_bin, payload_bin); + if (error != GRPC_ERROR_NONE) return error; calld->on_complete = op->on_complete; op->on_complete = &calld->hc_on_complete; op->send_message = NULL; @@ -288,21 +303,32 @@ static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } } - grpc_metadata_batch_filter(exec_ctx, op->send_initial_metadata, - client_strip_filter, elem); + remove_if_present(op->send_initial_metadata, GRPC_BATCH_METHOD); + remove_if_present(op->send_initial_metadata, GRPC_BATCH_SCHEME); + remove_if_present(op->send_initial_metadata, GRPC_BATCH_TE); + remove_if_present(op->send_initial_metadata, GRPC_BATCH_CONTENT_TYPE); + remove_if_present(op->send_initial_metadata, GRPC_BATCH_USER_AGENT); + /* Send : prefixed headers, which have to be before any application layer headers. */ - grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->method, - method); - grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->scheme, - channeld->static_scheme); - grpc_metadata_batch_add_tail(op->send_initial_metadata, &calld->te_trailers, - GRPC_MDELEM_TE_TRAILERS); - grpc_metadata_batch_add_tail( + error = grpc_metadata_batch_add_head(op->send_initial_metadata, + &calld->method, method); + if (error != GRPC_ERROR_NONE) return error; + error = grpc_metadata_batch_add_head( + op->send_initial_metadata, &calld->scheme, channeld->static_scheme); + if (error != GRPC_ERROR_NONE) return error; + error = grpc_metadata_batch_add_tail(op->send_initial_metadata, + &calld->te_trailers, + GRPC_MDELEM_TE_TRAILERS); + if (error != GRPC_ERROR_NONE) return error; + error = grpc_metadata_batch_add_tail( op->send_initial_metadata, &calld->content_type, GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC); - grpc_metadata_batch_add_tail(op->send_initial_metadata, &calld->user_agent, - GRPC_MDELEM_REF(channeld->user_agent)); + if (error != GRPC_ERROR_NONE) return error; + error = grpc_metadata_batch_add_tail(op->send_initial_metadata, + &calld->user_agent, + GRPC_MDELEM_REF(channeld->user_agent)); + if (error != GRPC_ERROR_NONE) return error; } if (op->recv_initial_metadata != NULL) { @@ -318,6 +344,8 @@ static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, calld->on_done_recv_trailing_metadata = op->on_complete; op->on_complete = &calld->hc_on_recv_trailing_metadata; } + + return GRPC_ERROR_NONE; } static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, @@ -325,16 +353,20 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op) { GPR_TIMER_BEGIN("hc_start_transport_op", 0); GRPC_CALL_LOG_OP(GPR_INFO, elem, op); - hc_mutate_op(exec_ctx, elem, op); - GPR_TIMER_END("hc_start_transport_op", 0); - call_data *calld = elem->call_data; - if (op->send_message != NULL && calld->send_message_blocked) { - /* Don't forward the op. send_message contains slices that aren't ready - yet. The call will be forwarded by the op_complete of slice read call. - */ + grpc_error *error = hc_mutate_op(exec_ctx, elem, op); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); } else { - grpc_call_next_op(exec_ctx, elem, op); + call_data *calld = elem->call_data; + if (op->send_message != NULL && calld->send_message_blocked) { + /* Don't forward the op. send_message contains slices that aren't ready + yet. The call will be forwarded by the op_complete of slice read call. + */ + } else { + grpc_call_next_op(exec_ctx, elem, op); + } } + GPR_TIMER_END("hc_start_transport_op", 0); } /* Constructor for call_data */ diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index bdd1e18837..596c97e58e 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -48,18 +48,13 @@ extern int grpc_http_trace; typedef struct call_data { - uint8_t seen_path; - uint8_t seen_method; - uint8_t sent_status; - uint8_t seen_scheme; - uint8_t seen_te_trailers; - uint8_t seen_authority; - uint8_t seen_payload_bin; grpc_linked_mdelem status; grpc_linked_mdelem content_type; + /* did this request come with payload-bin */ + bool seen_payload_bin; /* flag to ensure payload_bin is delivered only once */ - uint8_t payload_bin_delivered; + bool payload_bin_delivered; grpc_metadata_batch *recv_initial_metadata; bool *recv_idempotent_request; @@ -84,118 +79,147 @@ typedef struct call_data { typedef struct channel_data { uint8_t unused; } channel_data; -static grpc_mdelem server_filter_outgoing_metadata(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_mdelem md) { - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_GRPC_MESSAGE)) { +static grpc_error *server_filter_outgoing_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_metadata_batch *b) { + if (b->idx.named.grpc_message != NULL) { grpc_slice pct_encoded_msg = grpc_percent_encode_slice( - GRPC_MDVALUE(md), grpc_compatible_percent_encoding_unreserved_bytes); - if (grpc_slice_is_equivalent(pct_encoded_msg, GRPC_MDVALUE(md))) { + GRPC_MDVALUE(b->idx.named.grpc_message->md), + grpc_compatible_percent_encoding_unreserved_bytes); + if (grpc_slice_is_equivalent(pct_encoded_msg, + GRPC_MDVALUE(b->idx.named.grpc_message->md))) { grpc_slice_unref_internal(exec_ctx, pct_encoded_msg); - return md; } else { - return grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_GRPC_MESSAGE, - pct_encoded_msg); + grpc_metadata_batch_set_value(exec_ctx, b->idx.named.grpc_message, + pct_encoded_msg); } - } else { - return md; } + return GRPC_ERROR_NONE; } -static grpc_mdelem server_filter(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem md) { - grpc_call_element *elem = user_data; +static void add_error(const char *error_name, grpc_error **cumulative, + grpc_error *new) { + abort(); +} + +static grpc_error *server_filter_incoming_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_metadata_batch *b) { call_data *calld = elem->call_data; + grpc_error *error = GRPC_ERROR_NONE; + static const char *error_name = "Failed processing incoming headers"; - /* Check if it is one of the headers we care about. */ - if (grpc_mdelem_eq(md, GRPC_MDELEM_TE_TRAILERS) || - grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_POST) || - grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_PUT) || - grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_GET) || - grpc_mdelem_eq(md, GRPC_MDELEM_SCHEME_HTTP) || - grpc_mdelem_eq(md, GRPC_MDELEM_SCHEME_HTTPS) || - grpc_mdelem_eq(md, GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC)) { - /* swallow it */ - if (grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_POST)) { - calld->seen_method = 1; + if (b->idx.named.method != NULL) { + if (grpc_mdelem_eq(b->idx.named.method->md, GRPC_MDELEM_METHOD_POST)) { *calld->recv_idempotent_request = false; *calld->recv_cacheable_request = false; - } else if (grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_PUT)) { - calld->seen_method = 1; + } else if (grpc_mdelem_eq(b->idx.named.method->md, + GRPC_MDELEM_METHOD_PUT)) { *calld->recv_idempotent_request = true; - } else if (grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_GET)) { - calld->seen_method = 1; + } else if (grpc_mdelem_eq(b->idx.named.method->md, + GRPC_MDELEM_METHOD_GET)) { *calld->recv_cacheable_request = true; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_SCHEME)) { - calld->seen_scheme = 1; - } else if (grpc_mdelem_eq(md, GRPC_MDELEM_TE_TRAILERS)) { - calld->seen_te_trailers = 1; - } - /* TODO(klempner): Track that we've seen all the headers we should - require */ - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_CONTENT_TYPE)) { - if (grpc_slice_buf_start_eq(GRPC_MDVALUE(md), EXPECTED_CONTENT_TYPE, - EXPECTED_CONTENT_TYPE_LENGTH) && - (GRPC_SLICE_START_PTR(GRPC_MDVALUE(md))[EXPECTED_CONTENT_TYPE_LENGTH] == - '+' || - GRPC_SLICE_START_PTR(GRPC_MDVALUE(md))[EXPECTED_CONTENT_TYPE_LENGTH] == - ';')) { - /* Although the C implementation doesn't (currently) generate them, - any custom +-suffix is explicitly valid. */ - /* TODO(klempner): We should consider preallocating common values such - as +proto or +json, or at least stashing them if we see them. */ - /* TODO(klempner): Should we be surfacing this to application code? */ } else { - /* TODO(klempner): We're currently allowing this, but we shouldn't - see it without a proxy so log for now. */ - char *val = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_log(GPR_INFO, "Unexpected content-type '%s'", val); - gpr_free(val); + add_error(error_name, &error, + grpc_attach_md_to_error(GRPC_ERROR_CREATE("Bad header"), + b->idx.named.method->md)); } - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_TE) || - grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_METHOD) || - grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_SCHEME)) { - char *key = grpc_dump_slice(GRPC_MDKEY(md), GPR_DUMP_ASCII); - char *value = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); - gpr_log(GPR_ERROR, "Invalid %s: header: '%s'", key, value); - /* swallow it and error everything out. */ - /* TODO(klempner): We ought to generate more descriptive error messages - on the wire here. */ - gpr_free(key); - gpr_free(value); - grpc_call_element_send_cancel(exec_ctx, elem); - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_PATH)) { - if (calld->seen_path) { - gpr_log(GPR_ERROR, "Received :path twice"); - return GRPC_MDNULL; + grpc_metadata_batch_remove(b, b->idx.named.method); + } else { + add_error(error_name, &error, + grpc_error_set_str(GRPC_ERROR_CREATE("Missing header"), + GRPC_ERROR_STR_KEY, ":method")); + } + + if (b->idx.named.te != NULL) { + if (!grpc_mdelem_eq(b->idx.named.te->md, GRPC_MDELEM_TE_TRAILERS)) { + add_error(error_name, &error, + grpc_attach_md_to_error(GRPC_ERROR_CREATE("Bad header"), + b->idx.named.te->md)); } - calld->seen_path = 1; - return md; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_AUTHORITY)) { - calld->seen_authority = 1; - return md; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_HOST)) { - /* translate host to :authority since :authority may be - omitted */ - grpc_mdelem authority = grpc_mdelem_from_slices( - exec_ctx, GRPC_MDSTR_AUTHORITY, grpc_slice_ref(GRPC_MDVALUE(md))); - calld->seen_authority = 1; - return authority; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_GRPC_PAYLOAD_BIN)) { - /* Retrieve the payload from the value of the 'grpc-internal-payload-bin' - header field */ - calld->seen_payload_bin = 1; + grpc_metadata_batch_remove(b, b->idx.named.te); + } else { + add_error(error_name, &error, + grpc_error_set_str(GRPC_ERROR_CREATE("Missing header"), + GRPC_ERROR_STR_KEY, "te")); + } + + if (b->idx.named.scheme != NULL) { + if (!grpc_mdelem_eq(b->idx.named.te->md, GRPC_MDELEM_SCHEME_HTTP) && + !grpc_mdelem_eq(b->idx.named.te->md, GRPC_MDELEM_SCHEME_HTTPS) && + !grpc_mdelem_eq(b->idx.named.te->md, GRPC_MDELEM_SCHEME_GRPC)) { + add_error(error_name, &error, + grpc_attach_md_to_error(GRPC_ERROR_CREATE("Bad header"), + b->idx.named.te->md)); + } + grpc_metadata_batch_remove(b, b->idx.named.scheme); + } else { + add_error(error_name, &error, + grpc_error_set_str(GRPC_ERROR_CREATE("Missing header"), + GRPC_ERROR_STR_KEY, ":scheme")); + } + + if (b->idx.named.content_type != NULL) { + if (!grpc_mdelem_eq(b->idx.named.content_type->md, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC)) { + if (grpc_slice_buf_start_eq(GRPC_MDVALUE(b->idx.named.content_type->md), + EXPECTED_CONTENT_TYPE, + EXPECTED_CONTENT_TYPE_LENGTH) && + (GRPC_SLICE_START_PTR(GRPC_MDVALUE( + b->idx.named.content_type->md))[EXPECTED_CONTENT_TYPE_LENGTH] == + '+' || + GRPC_SLICE_START_PTR(GRPC_MDVALUE( + b->idx.named.content_type->md))[EXPECTED_CONTENT_TYPE_LENGTH] == + ';')) { + /* Although the C implementation doesn't (currently) generate them, + any custom +-suffix is explicitly valid. */ + /* TODO(klempner): We should consider preallocating common values such + as +proto or +json, or at least stashing them if we see them. */ + /* TODO(klempner): Should we be surfacing this to application code? */ + } else { + /* TODO(klempner): We're currently allowing this, but we shouldn't + see it without a proxy so log for now. */ + char *val = grpc_dump_slice(GRPC_MDVALUE(b->idx.named.content_type->md), + GPR_DUMP_ASCII); + gpr_log(GPR_INFO, "Unexpected content-type '%s'", val); + gpr_free(val); + } + } + grpc_metadata_batch_remove(b, b->idx.named.content_type); + } + + if (b->idx.named.path == NULL) { + add_error(error_name, &error, + grpc_error_set_str(GRPC_ERROR_CREATE("Missing header"), + GRPC_ERROR_STR_KEY, ":path")); + } + + if (b->idx.named.host != NULL) { + add_error(error_name, &error, + grpc_metadata_batch_substitute( + b, b->idx.named.host, + grpc_mdelem_from_slices( + exec_ctx, GRPC_MDSTR_AUTHORITY, + grpc_slice_ref(GRPC_MDVALUE(b->idx.named.host->md))))); + } + + if (b->idx.named.authority == NULL) { + add_error(error_name, &error, + grpc_error_set_str(GRPC_ERROR_CREATE("Missing header"), + GRPC_ERROR_STR_KEY, ":authority")); + } + + if (b->idx.named.grpc_payload_bin != NULL) { + calld->seen_payload_bin = true; grpc_slice_buffer_add(&calld->read_slice_buffer, - grpc_slice_ref_internal(GRPC_MDVALUE(md))); + grpc_slice_ref_internal( + GRPC_MDVALUE(b->idx.named.grpc_payload_bin->md))); grpc_slice_buffer_stream_init(&calld->read_stream, &calld->read_slice_buffer, 0); - return GRPC_MDNULL; - } else { - return md; + grpc_metadata_batch_remove(b, b->idx.named.grpc_payload_bin); } + + return error; } static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, @@ -203,49 +227,12 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, grpc_call_element *elem = user_data; call_data *calld = elem->call_data; if (err == GRPC_ERROR_NONE) { - grpc_metadata_batch_filter(exec_ctx, calld->recv_initial_metadata, - server_filter, elem); - /* Have we seen the required http2 transport headers? - (:method, :scheme, content-type, with :path and :authority covered - at the channel level right now) */ - if (calld->seen_method && calld->seen_scheme && calld->seen_te_trailers && - calld->seen_path && calld->seen_authority) { - /* do nothing */ - } else { - err = GRPC_ERROR_CREATE("Bad incoming HTTP headers"); - if (!calld->seen_path) { - err = grpc_error_add_child(err, - GRPC_ERROR_CREATE("Missing :path header")); - } - if (!calld->seen_authority) { - err = grpc_error_add_child( - err, GRPC_ERROR_CREATE("Missing :authority header")); - } - if (!calld->seen_method) { - err = grpc_error_add_child(err, - GRPC_ERROR_CREATE("Missing :method header")); - } - if (!calld->seen_scheme) { - err = grpc_error_add_child(err, - GRPC_ERROR_CREATE("Missing :scheme header")); - } - if (!calld->seen_te_trailers) { - err = grpc_error_add_child( - err, GRPC_ERROR_CREATE("Missing te: trailers header")); - } - /* Error this call out */ - if (grpc_http_trace) { - const char *error_str = grpc_error_string(err); - gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str); - grpc_error_free_string(error_str); - } - grpc_call_element_send_cancel(exec_ctx, elem); - } + err = server_filter_incoming_metadata(exec_ctx, elem, + calld->recv_initial_metadata); } else { GRPC_ERROR_REF(err); } - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, err); - GRPC_ERROR_UNREF(err); + grpc_closure_run(exec_ctx, calld->on_done_recv, err); } static void hs_on_complete(grpc_exec_ctx *exec_ctx, void *user_data, @@ -283,13 +270,23 @@ static void hs_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; - if (op->send_initial_metadata != NULL && !calld->sent_status) { - calld->sent_status = 1; - grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->status, - GRPC_MDELEM_STATUS_200); - grpc_metadata_batch_add_tail( - op->send_initial_metadata, &calld->content_type, - GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC); + if (op->send_initial_metadata != NULL) { + grpc_error *error = GRPC_ERROR_NONE; + static const char *error_name = "Failed sending initial metadata"; + add_error(error_name, &error, grpc_metadata_batch_add_head( + op->send_initial_metadata, &calld->status, + GRPC_MDELEM_STATUS_200)); + add_error(error_name, &error, + grpc_metadata_batch_add_tail( + op->send_initial_metadata, &calld->content_type, + GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC)); + add_error(error_name, &error, + server_filter_outgoing_metadata(exec_ctx, elem, + op->send_initial_metadata)); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); + return; + } } if (op->recv_initial_metadata) { @@ -316,8 +313,12 @@ static void hs_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } if (op->send_trailing_metadata) { - grpc_metadata_batch_filter(exec_ctx, op->send_trailing_metadata, - server_filter_outgoing_metadata, elem); + grpc_error *error = server_filter_outgoing_metadata( + exec_ctx, elem, op->send_trailing_metadata); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); + return; + } } } diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index f6bb3a0477..82edcfd16c 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -128,6 +128,10 @@ static const char *error_int_name(grpc_error_ints key) { static const char *error_str_name(grpc_error_strs key) { switch (key) { + case GRPC_ERROR_STR_KEY: + return "key"; + case GRPC_ERROR_STR_VALUE: + return "value"; case GRPC_ERROR_STR_DESCRIPTION: return "description"; case GRPC_ERROR_STR_OS_ERROR: diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index f3f3b80a09..a2ba84deed 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -124,7 +124,11 @@ typedef enum { /// filename that we were trying to read/write when this error occurred GRPC_ERROR_STR_FILENAME, /// which data was queued for writing when the error occurred - GRPC_ERROR_STR_QUEUED_BUFFERS + GRPC_ERROR_STR_QUEUED_BUFFERS, + /// key associated with the error + GRPC_ERROR_STR_KEY, + /// value associated with the error + GRPC_ERROR_STR_VALUE, } grpc_error_strs; typedef enum { diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 13c0277109..43054bcfb4 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -102,6 +102,8 @@ static void bubble_up_error(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_next_op(exec_ctx, elem, &calld->op); } +static void add_error(grpc_error **combined, grpc_error *error) { abort(); } + static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, size_t num_md, @@ -123,14 +125,20 @@ static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, GPR_ASSERT(num_md <= MAX_CREDENTIALS_METADATA_COUNT); GPR_ASSERT(op->send_initial_metadata != NULL); mdb = op->send_initial_metadata; + grpc_error *error = GRPC_ERROR_NONE; for (i = 0; i < num_md; i++) { - grpc_metadata_batch_add_tail( - mdb, &calld->md_links[i], - grpc_mdelem_from_slices(exec_ctx, - grpc_slice_ref_internal(md_elems[i].key), - grpc_slice_ref_internal(md_elems[i].value))); + add_error(&error, + grpc_metadata_batch_add_tail( + mdb, &calld->md_links[i], + grpc_mdelem_from_slices( + exec_ctx, grpc_slice_ref_internal(md_elems[i].key), + grpc_slice_ref_internal(md_elems[i].value)))); + } + if (error == GRPC_ERROR_NONE) { + grpc_call_next_op(exec_ctx, elem, op); + } else { + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); } - grpc_call_next_op(exec_ctx, elem, op); } void build_auth_metadata_context(grpc_security_connector *sc, diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 1d14cfef53..ed9d92b74e 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -83,6 +83,7 @@ static grpc_metadata_array metadata_batch_to_md_array( return result; } +#if 0 static grpc_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, void *user_data, grpc_mdelem md) { grpc_call_element *elem = user_data; @@ -91,11 +92,12 @@ static grpc_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, void *user_data, for (i = 0; i < calld->num_consumed_md; i++) { const grpc_metadata *consumed_md = &calld->consumed_md[i]; if (grpc_slice_eq(GRPC_MDKEY(md), consumed_md->key) && - grpc_slice_eq(GRPC_MDKEY(md), consumed_md->value)) + grpc_slice_eq(GRPC_MDVALUE(md), consumed_md->value)) return GRPC_MDNULL; } return md; } +#endif static void destroy_op(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(arg); @@ -120,8 +122,12 @@ static void on_md_processing_done( if (status == GRPC_STATUS_OK) { calld->consumed_md = consumed_md; calld->num_consumed_md = num_consumed_md; +#if 0 grpc_metadata_batch_filter(&exec_ctx, calld->recv_initial_metadata, remove_consumed_md, elem); +#else + if (num_consumed_md) abort(); +#endif grpc_metadata_array_destroy(&calld->md); grpc_exec_ctx_sched(&exec_ctx, calld->on_done_recv, GRPC_ERROR_NONE, NULL); } else { diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index af53a5b246..4e1ca22cb8 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -914,71 +914,73 @@ static grpc_compression_algorithm decode_compression(grpc_mdelem md) { return algorithm; } -static grpc_mdelem recv_common_filter(grpc_exec_ctx *exec_ctx, grpc_call *call, - grpc_mdelem elem) { - if (grpc_slice_eq(GRPC_MDKEY(elem), GRPC_MDSTR_GRPC_STATUS)) { +static void recv_common_filter(grpc_exec_ctx *exec_ctx, grpc_call *call, + grpc_metadata_batch *b) { + if (b->idx.named.grpc_status != NULL) { GPR_TIMER_BEGIN("status", 0); - set_status_code(call, STATUS_FROM_WIRE, decode_status(elem)); + set_status_code(call, STATUS_FROM_WIRE, + decode_status(b->idx.named.grpc_status->md)); + grpc_metadata_batch_remove(b, b->idx.named.grpc_status); GPR_TIMER_END("status", 0); - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(elem), GRPC_MDSTR_GRPC_MESSAGE)) { + } + + if (b->idx.named.grpc_message != NULL) { GPR_TIMER_BEGIN("status-details", 0); - set_status_details(exec_ctx, call, STATUS_FROM_WIRE, - grpc_slice_ref_internal(GRPC_MDVALUE(elem))); + set_status_details( + exec_ctx, call, STATUS_FROM_WIRE, + grpc_slice_ref_internal(GRPC_MDVALUE(b->idx.named.grpc_message->md))); + grpc_metadata_batch_remove(b, b->idx.named.grpc_message); GPR_TIMER_END("status-details", 0); - return GRPC_MDNULL; } - return elem; } -static grpc_mdelem publish_app_metadata(grpc_call *call, grpc_mdelem elem, - int is_trailing) { +static void publish_app_metadata(grpc_call *call, grpc_metadata_batch *b, + int is_trailing) { + GPR_TIMER_BEGIN("publish_app_metadata", 0); grpc_metadata_array *dest; grpc_metadata *mdusr; - GPR_TIMER_BEGIN("publish_app_metadata", 0); dest = call->buffered_metadata[is_trailing]; - if (dest->count == dest->capacity) { - dest->capacity = GPR_MAX(dest->capacity + 8, dest->capacity * 2); + if (dest->count + b->count > dest->capacity) { + dest->capacity = GPR_MAX(dest->capacity + b->count, dest->capacity * 3 / 2); dest->metadata = gpr_realloc(dest->metadata, sizeof(grpc_metadata) * dest->capacity); } - mdusr = &dest->metadata[dest->count++]; - mdusr->key = grpc_slice_ref(GRPC_MDKEY(elem)); - mdusr->value = grpc_slice_ref(GRPC_MDVALUE(elem)); + for (grpc_linked_mdelem *l = b->list.head; l != NULL; l = l->next) { + mdusr = &dest->metadata[dest->count++]; + mdusr->key = grpc_slice_ref(GRPC_MDKEY(l->md)); + mdusr->value = grpc_slice_ref(GRPC_MDVALUE(l->md)); + } GPR_TIMER_END("publish_app_metadata", 0); - return elem; } -static grpc_mdelem recv_initial_filter(grpc_exec_ctx *exec_ctx, void *args, - grpc_mdelem elem) { - grpc_call *call = args; - elem = recv_common_filter(exec_ctx, call, elem); - if (GRPC_MDISNULL(elem)) { - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(elem), GRPC_MDSTR_GRPC_ENCODING)) { +static void recv_initial_filter(grpc_exec_ctx *exec_ctx, grpc_call *call, + grpc_metadata_batch *b) { + recv_common_filter(exec_ctx, call, b); + + if (b->idx.named.grpc_encoding != NULL) { GPR_TIMER_BEGIN("incoming_compression_algorithm", 0); - set_incoming_compression_algorithm(call, decode_compression(elem)); + set_incoming_compression_algorithm( + call, decode_compression(b->idx.named.grpc_encoding->md)); GPR_TIMER_END("incoming_compression_algorithm", 0); - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(elem), GRPC_MDSTR_GRPC_ACCEPT_ENCODING)) { + grpc_metadata_batch_remove(b, b->idx.named.grpc_encoding); + } + + if (b->idx.named.grpc_accept_encoding != NULL) { GPR_TIMER_BEGIN("encodings_accepted_by_peer", 0); - set_encodings_accepted_by_peer(exec_ctx, call, elem); + set_encodings_accepted_by_peer(exec_ctx, call, + b->idx.named.grpc_accept_encoding->md); + grpc_metadata_batch_remove(b, b->idx.named.grpc_accept_encoding); GPR_TIMER_END("encodings_accepted_by_peer", 0); - return GRPC_MDNULL; - } else { - return publish_app_metadata(call, elem, 0); } + + publish_app_metadata(call, b, false); } -static grpc_mdelem recv_trailing_filter(grpc_exec_ctx *exec_ctx, void *args, - grpc_mdelem elem) { +static void recv_trailing_filter(grpc_exec_ctx *exec_ctx, void *args, + grpc_metadata_batch *b) { grpc_call *call = args; - elem = recv_common_filter(exec_ctx, call, elem); - if (GRPC_MDISNULL(elem)) { - return GRPC_MDNULL; - } else { - return publish_app_metadata(call, elem, 1); - } + recv_common_filter(exec_ctx, call, b); + publish_app_metadata(call, b, true); } grpc_call_stack *grpc_call_get_call_stack(grpc_call *call) { @@ -1223,8 +1225,9 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, if (error == GRPC_ERROR_NONE) { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; - grpc_metadata_batch_filter(exec_ctx, md, recv_initial_filter, call); + recv_initial_filter(exec_ctx, call, md); + /* TODO(ctiller): this could be moved into recv_initial_filter now */ GPR_TIMER_BEGIN("validate_filtered_metadata", 0); validate_filtered_metadata(exec_ctx, bctl); GPR_TIMER_END("validate_filtered_metadata", 0); @@ -1289,7 +1292,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, if (bctl->recv_final_op) { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */]; - grpc_metadata_batch_filter(exec_ctx, md, recv_trailing_filter, call); + recv_trailing_filter(exec_ctx, call, md); call->received_final_op = true; /* propagate cancellation to any interested children */ diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 1c29873a65..8b30ce4f91 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -735,35 +735,25 @@ static void maybe_finish_shutdown(grpc_exec_ctx *exec_ctx, } } -static grpc_mdelem server_filter(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem md) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_PATH)) { - if (!calld->path_set) { - calld->path = grpc_slice_ref(GRPC_MDVALUE(md)); - calld->path_set = true; - } - return GRPC_MDNULL; - } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_AUTHORITY)) { - if (!calld->host_set) { - calld->host = grpc_slice_ref(GRPC_MDVALUE(md)); - calld->host_set = true; - } - return GRPC_MDNULL; - } - return md; -} - static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, grpc_error *error) { grpc_call_element *elem = ptr; call_data *calld = elem->call_data; gpr_timespec op_deadline; + if (error == GRPC_ERROR_NONE) { + GPR_ASSERT(calld->recv_initial_metadata->idx.named.path != NULL); + GPR_ASSERT(calld->recv_initial_metadata->idx.named.authority != NULL); + calld->path = grpc_slice_ref( + GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.path->md)); + calld->host = grpc_slice_ref( + GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.authority->md)); + calld->path_set = true; + calld->host_set = true; + } else { + GRPC_ERROR_REF(error); + } GRPC_ERROR_REF(error); - grpc_metadata_batch_filter(exec_ctx, calld->recv_initial_metadata, - server_filter, elem); op_deadline = calld->recv_initial_metadata->deadline; if (0 != gpr_time_cmp(op_deadline, gpr_inf_future(op_deadline.clock_type))) { calld->deadline = op_deadline; diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index 9e0a8fbbe1..39e49283bf 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -40,6 +40,7 @@ #include <grpc/support/log.h> #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" static void assert_valid_list(grpc_mdelem_list *list) { #ifndef NDEBUG @@ -61,6 +62,20 @@ static void assert_valid_list(grpc_mdelem_list *list) { #endif /* NDEBUG */ } +static void assert_valid_callouts(grpc_metadata_batch *batch) { +#ifndef NDEBUG + for (grpc_linked_mdelem *l = batch->list.head; l != NULL; l = l->next) { + grpc_slice key_interned = grpc_slice_intern(GRPC_MDKEY(l->md)); + grpc_metadata_batch_callouts_index callout_idx = + grpc_batch_index_of(key_interned); + if (callout_idx != GRPC_BATCH_CALLOUTS_COUNT) { + GPR_ASSERT(batch->idx.array[callout_idx] == l); + } + grpc_slice_unref(key_interned); + } +#endif +} + #ifndef NDEBUG void grpc_metadata_batch_assert_ok(grpc_metadata_batch *batch) { assert_valid_list(&batch->list); @@ -68,7 +83,7 @@ void grpc_metadata_batch_assert_ok(grpc_metadata_batch *batch) { #endif /* NDEBUG */ void grpc_metadata_batch_init(grpc_metadata_batch *batch) { - batch->list.head = batch->list.tail = NULL; + memset(batch, 0, sizeof(*batch)); batch->deadline = gpr_inf_future(GPR_CLOCK_REALTIME); } @@ -80,12 +95,52 @@ void grpc_metadata_batch_destroy(grpc_exec_ctx *exec_ctx, } } -void grpc_metadata_batch_add_head(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage, - grpc_mdelem elem_to_add) { +grpc_error *grpc_attach_md_to_error(grpc_error *src, grpc_mdelem md) { + char *k = grpc_dump_slice(GRPC_MDKEY(md), GPR_DUMP_ASCII); + char *v = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_ASCII); + grpc_error *out = grpc_error_set_str( + grpc_error_set_str(src, GRPC_ERROR_STR_KEY, k), GRPC_ERROR_STR_VALUE, v); + gpr_free(k); + gpr_free(v); + return out; +} + +static grpc_error *maybe_link_callout(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) + GRPC_MUST_USE_RESULT; + +static grpc_error *maybe_link_callout(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) { + grpc_metadata_batch_callouts_index idx = + grpc_batch_index_of(GRPC_MDKEY(storage->md)); + if (idx == GRPC_BATCH_CALLOUTS_COUNT) { + return GRPC_ERROR_NONE; + } + if (batch->idx.array[idx] != NULL) { + return grpc_attach_md_to_error( + GRPC_ERROR_CREATE("Unallowed duplicate metadata"), storage->md); + } + batch->idx.array[idx] = storage; + return GRPC_ERROR_NONE; +} + +static void maybe_unlink_callout(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) { + grpc_metadata_batch_callouts_index idx = + grpc_batch_index_of(GRPC_MDKEY(storage->md)); + if (idx == GRPC_BATCH_CALLOUTS_COUNT) { + return; + } + GPR_ASSERT(batch->idx.array[idx] != NULL); + batch->idx.array[idx] = NULL; +} + +grpc_error *grpc_metadata_batch_add_head(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage, + grpc_mdelem elem_to_add) { GPR_ASSERT(!GRPC_MDISNULL(elem_to_add)); storage->md = elem_to_add; - grpc_metadata_batch_link_head(batch, storage); + return grpc_metadata_batch_link_head(batch, storage); } static void link_head(grpc_mdelem_list *list, grpc_linked_mdelem *storage) { @@ -102,17 +157,25 @@ static void link_head(grpc_mdelem_list *list, grpc_linked_mdelem *storage) { assert_valid_list(list); } -void grpc_metadata_batch_link_head(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage) { +grpc_error *grpc_metadata_batch_link_head(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) { + assert_valid_callouts(batch); + grpc_error *err = maybe_link_callout(batch, storage); + if (err != GRPC_ERROR_NONE) { + assert_valid_callouts(batch); + return err; + } link_head(&batch->list, storage); + assert_valid_callouts(batch); + return GRPC_ERROR_NONE; } -void grpc_metadata_batch_add_tail(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage, - grpc_mdelem elem_to_add) { +grpc_error *grpc_metadata_batch_add_tail(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage, + grpc_mdelem elem_to_add) { GPR_ASSERT(!GRPC_MDISNULL(elem_to_add)); storage->md = elem_to_add; - grpc_metadata_batch_link_tail(batch, storage); + return grpc_metadata_batch_link_tail(batch, storage); } static void link_tail(grpc_mdelem_list *list, grpc_linked_mdelem *storage) { @@ -130,67 +193,47 @@ static void link_tail(grpc_mdelem_list *list, grpc_linked_mdelem *storage) { assert_valid_list(list); } -void grpc_metadata_batch_link_tail(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage) { +grpc_error *grpc_metadata_batch_link_tail(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) { + assert_valid_callouts(batch); + grpc_error *err = maybe_link_callout(batch, storage); + if (err != GRPC_ERROR_NONE) { + assert_valid_callouts(batch); + return err; + } link_tail(&batch->list, storage); + assert_valid_callouts(batch); + return GRPC_ERROR_NONE; } -void grpc_metadata_batch_move(grpc_metadata_batch *dst, - grpc_metadata_batch *src) { - *dst = *src; - memset(src, 0, sizeof(grpc_metadata_batch)); -} - -void grpc_metadata_batch_filter(grpc_exec_ctx *exec_ctx, - grpc_metadata_batch *batch, - grpc_mdelem (*filter)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_mdelem elem), - void *user_data) { - grpc_linked_mdelem *l; - grpc_linked_mdelem *next; - - GPR_TIMER_BEGIN("grpc_metadata_batch_filter", 0); - - assert_valid_list(&batch->list); - for (l = batch->list.head; l; l = next) { - grpc_mdelem orig = l->md; - grpc_mdelem filt = filter(exec_ctx, user_data, orig); - next = l->next; - if (GRPC_MDISNULL(filt)) { - if (l->prev) { - l->prev->next = l->next; - } - if (l->next) { - l->next->prev = l->prev; - } - if (batch->list.head == l) { - batch->list.head = l->next; - } - if (batch->list.tail == l) { - batch->list.tail = l->prev; - } - assert_valid_list(&batch->list); - GRPC_MDELEM_UNREF(exec_ctx, l->md); - } else if (!grpc_mdelem_eq(filt, orig)) { - GRPC_MDELEM_UNREF(exec_ctx, orig); - l->md = filt; - } +static void unlink_storage(grpc_mdelem_list *list, + grpc_linked_mdelem *storage) { + assert_valid_list(list); + if (storage->prev != NULL) { + storage->prev->next = storage->next; + } else { + list->head = storage->next; } - assert_valid_list(&batch->list); - - GPR_TIMER_END("grpc_metadata_batch_filter", 0); + if (storage->next != NULL) { + storage->next->prev = storage->prev; + } else { + list->tail = storage->prev; + } + assert_valid_list(list); } -static grpc_mdelem no_metadata_for_you(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_mdelem elem) { - return GRPC_MDNULL; +void grpc_metadata_batch_remove(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) { + assert_valid_callouts(batch); + maybe_unlink_callout(batch, storage); + unlink_storage(&batch->list, storage); + assert_valid_callouts(batch); } void grpc_metadata_batch_clear(grpc_exec_ctx *exec_ctx, grpc_metadata_batch *batch) { - batch->deadline = gpr_inf_future(GPR_CLOCK_REALTIME); - grpc_metadata_batch_filter(exec_ctx, batch, no_metadata_for_you, NULL); + grpc_metadata_batch_destroy(exec_ctx, batch); + grpc_metadata_batch_init(batch); } bool grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) { diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 2c82ed6983..1cc3814044 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -41,6 +41,7 @@ #include <grpc/support/port_platform.h> #include <grpc/support/time.h> #include "src/core/lib/transport/metadata.h" +#include "src/core/lib/transport/static_metadata.h" #ifdef __cplusplus extern "C" { @@ -59,8 +60,11 @@ typedef struct grpc_mdelem_list { } grpc_mdelem_list; typedef struct grpc_metadata_batch { + /* number of elements in the batch */ + size_t count; /** Metadata elements in this batch */ grpc_mdelem_list list; + grpc_metadata_batch_callouts idx; /** Used to calculate grpc-timeout at the point of sending, or gpr_inf_future if this batch does not need to send a grpc-timeout */ @@ -77,25 +81,35 @@ bool grpc_metadata_batch_is_empty(grpc_metadata_batch *batch); /* Returns the transport size of the batch. */ size_t grpc_metadata_batch_size(grpc_metadata_batch *batch); -/** Moves the metadata information from \a src to \a dst. Upon return, \a src is - * zeroed. */ -void grpc_metadata_batch_move(grpc_metadata_batch *dst, - grpc_metadata_batch *src); +/** Remove \a storage from the batch, unreffing the mdelem contained */ +void grpc_metadata_batch_remove(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage); + +/** Substitute a new mdelem for an old value */ +grpc_error *grpc_metadata_batch_substitute(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage, + grpc_mdelem new_value); + +void grpc_metadata_batch_set_value(grpc_exec_ctx *exec_ctx, + grpc_linked_mdelem *storage, + grpc_slice value); /** Add \a storage to the beginning of \a batch. storage->md is assumed to be valid. \a storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call. */ -void grpc_metadata_batch_link_head(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage); +grpc_error *grpc_metadata_batch_link_head(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) + GRPC_MUST_USE_RESULT; /** Add \a storage to the end of \a batch. storage->md is assumed to be valid. \a storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call. */ -void grpc_metadata_batch_link_tail(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage); +grpc_error *grpc_metadata_batch_link_tail(grpc_metadata_batch *batch, + grpc_linked_mdelem *storage) + GRPC_MUST_USE_RESULT; /** Add \a elem_to_add as the first element in \a batch, using \a storage as backing storage for the linked list element. @@ -103,29 +117,20 @@ void grpc_metadata_batch_link_tail(grpc_metadata_batch *batch, lifetime of batch. This usually means it should be around for the lifetime of the call. Takes ownership of \a elem_to_add */ -void grpc_metadata_batch_add_head(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage, - grpc_mdelem elem_to_add); +grpc_error *grpc_metadata_batch_add_head( + grpc_metadata_batch *batch, grpc_linked_mdelem *storage, + grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT; /** Add \a elem_to_add as the last element in \a batch, using \a storage as backing storage for the linked list element. \a storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call. Takes ownership of \a elem_to_add */ -void grpc_metadata_batch_add_tail(grpc_metadata_batch *batch, - grpc_linked_mdelem *storage, - grpc_mdelem elem_to_add); - -/** For each element in \a batch, execute \a filter. - The return value from \a filter will be substituted for the - grpc_mdelem passed to \a filter. If \a filter returns NULL, - the element will be moved to the garbage list. */ -void grpc_metadata_batch_filter(grpc_exec_ctx *exec_ctx, - grpc_metadata_batch *batch, - grpc_mdelem (*filter)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_mdelem elem), - void *user_data); +grpc_error *grpc_metadata_batch_add_tail( + grpc_metadata_batch *batch, grpc_linked_mdelem *storage, + grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT; + +grpc_error *grpc_attach_md_to_error(grpc_error *src, grpc_mdelem md); #ifndef NDEBUG void grpc_metadata_batch_assert_ok(grpc_metadata_batch *comd); diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index 55c5cd4619..5232bd7a98 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -44,16 +44,44 @@ #include "src/core/lib/slice/slice_internal.h" static uint8_t g_bytes[] = { - 48, 49, 50, 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, - 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, 115, 101, 116, 97, - 99, 99, 101, 112, 116, 45, 101, 110, 99, 111, 100, 105, 110, 103, 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, 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, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 103, - 114, 112, 99, 58, 97, 117, 116, 104, 111, 114, 105, 116, 121, 97, 117, + 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, 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, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, + 112, 101, 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, 117, 115, 101, 114, 45, 97, 103, 101, 110, 116, 104, 111, 115, + 116, 108, 98, 45, 116, 111, 107, 101, 110, 108, 98, 45, 99, 111, 115, + 116, 45, 98, 105, 110, 103, 114, 112, 99, 45, 116, 105, 109, 101, 111, + 117, 116, 103, 114, 112, 99, 45, 116, 114, 97, 99, 105, 110, 103, 45, + 98, 105, 110, 103, 114, 112, 99, 45, 115, 116, 97, 116, 115, 45, 98, + 105, 110, 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, 48, 49, 50, 105, 100, + 101, 110, 116, 105, 116, 121, 103, 122, 105, 112, 100, 101, 102, 108, 97, + 116, 101, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, + 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 80, 79, 83, 84, + 50, 48, 48, 52, 48, 52, 104, 116, 116, 112, 104, 116, 116, 112, 115, + 103, 114, 112, 99, 71, 69, 84, 80, 85, 84, 47, 47, 105, 110, 100, + 101, 120, 46, 104, 116, 109, 108, 50, 48, 52, 50, 48, 54, 51, 48, + 52, 52, 48, 48, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, + 104, 97, 114, 115, 101, 116, 97, 99, 99, 101, 112, 116, 45, 101, 110, + 99, 111, 100, 105, 110, 103, 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, @@ -62,57 +90,29 @@ static uint8_t g_bytes[] = { 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, - 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 99, 111, 111, 107, 105, - 101, 100, 97, 116, 101, 100, 101, 102, 108, 97, 116, 101, 100, 101, 102, - 108, 97, 116, 101, 44, 103, 122, 105, 112, 101, 116, 97, 103, 101, 120, - 112, 101, 99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, - 71, 69, 84, 103, 114, 112, 99, 103, 114, 112, 99, 45, 97, 99, 99, - 101, 112, 116, 45, 101, 110, 99, 111, 100, 105, 110, 103, 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, 103, 114, - 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103, 114, 112, 99, 46, - 119, 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97, 100, 121, 103, - 114, 112, 99, 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, 109, 101, 115, 115, 97, 103, 101, 103, 114, 112, 99, 45, 112, - 97, 121, 108, 111, 97, 100, 45, 98, 105, 110, 103, 114, 112, 99, 45, - 115, 116, 97, 116, 115, 45, 98, 105, 110, 103, 114, 112, 99, 45, 115, - 116, 97, 116, 117, 115, 103, 114, 112, 99, 45, 116, 105, 109, 101, 111, - 117, 116, 103, 114, 112, 99, 45, 116, 114, 97, 99, 105, 110, 103, 45, - 98, 105, 110, 103, 122, 105, 112, 103, 122, 105, 112, 44, 32, 100, 101, - 102, 108, 97, 116, 101, 104, 111, 115, 116, 104, 116, 116, 112, 104, 116, - 116, 112, 115, 105, 100, 101, 110, 116, 105, 116, 121, 105, 100, 101, 110, - 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, 101, - 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, - 122, 105, 112, 105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, - 112, 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, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, - 108, 98, 45, 116, 111, 107, 101, 110, 108, 105, 110, 107, 108, 111, 99, - 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, - 100, 115, 58, 109, 101, 116, 104, 111, 100, 58, 112, 97, 116, 104, 80, - 79, 83, 84, 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, 80, 85, 84, 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, 58, 115, - 99, 104, 101, 109, 101, 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, - 99, 111, 111, 107, 105, 101, 47, 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, 105, - 110, 100, 101, 120, 46, 104, 116, 109, 108, 58, 115, 116, 97, 116, 117, - 115, 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, 101, 116, 114, - 97, 105, 108, 101, 114, 115, 116, 114, 97, 110, 115, 102, 101, 114, 45, - 101, 110, 99, 111, 100, 105, 110, 103, 117, 115, 101, 114, 45, 97, 103, - 101, 110, 116, 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, - 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101}; + 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, 105, 100, 101, 110, 116, 105, + 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, 101, 110, 116, + 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108, 97, 116, 101, + 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, + 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112}; static void static_ref(void *unused) {} static void static_unref(grpc_exec_ctx *exec_ctx, void *unused) {} @@ -124,55 +124,55 @@ typedef struct { const uint16_t length; } static_slice_refcount; static static_slice_refcount g_refcnts[GRPC_STATIC_MDSTR_COUNT] = { - {{&static_vtable}, 0, 1}, {{&static_vtable}, 1, 1}, - {{&static_vtable}, 2, 1}, {{&static_vtable}, 3, 3}, - {{&static_vtable}, 6, 3}, {{&static_vtable}, 9, 3}, - {{&static_vtable}, 12, 3}, {{&static_vtable}, 15, 3}, - {{&static_vtable}, 18, 3}, {{&static_vtable}, 21, 3}, - {{&static_vtable}, 24, 6}, {{&static_vtable}, 30, 14}, - {{&static_vtable}, 44, 15}, {{&static_vtable}, 59, 15}, - {{&static_vtable}, 74, 13}, {{&static_vtable}, 87, 27}, - {{&static_vtable}, 114, 3}, {{&static_vtable}, 117, 5}, - {{&static_vtable}, 122, 16}, {{&static_vtable}, 138, 10}, - {{&static_vtable}, 148, 13}, {{&static_vtable}, 161, 13}, - {{&static_vtable}, 174, 19}, {{&static_vtable}, 193, 16}, - {{&static_vtable}, 209, 16}, {{&static_vtable}, 225, 14}, - {{&static_vtable}, 239, 16}, {{&static_vtable}, 255, 13}, - {{&static_vtable}, 268, 12}, {{&static_vtable}, 280, 6}, - {{&static_vtable}, 286, 4}, {{&static_vtable}, 290, 7}, - {{&static_vtable}, 297, 12}, {{&static_vtable}, 309, 0}, - {{&static_vtable}, 309, 4}, {{&static_vtable}, 313, 6}, - {{&static_vtable}, 319, 7}, {{&static_vtable}, 326, 4}, - {{&static_vtable}, 330, 3}, {{&static_vtable}, 333, 4}, - {{&static_vtable}, 337, 20}, {{&static_vtable}, 357, 30}, - {{&static_vtable}, 387, 31}, {{&static_vtable}, 418, 12}, - {{&static_vtable}, 430, 19}, {{&static_vtable}, 449, 13}, - {{&static_vtable}, 462, 30}, {{&static_vtable}, 492, 12}, - {{&static_vtable}, 504, 16}, {{&static_vtable}, 520, 14}, - {{&static_vtable}, 534, 11}, {{&static_vtable}, 545, 12}, - {{&static_vtable}, 557, 16}, {{&static_vtable}, 573, 4}, - {{&static_vtable}, 577, 13}, {{&static_vtable}, 590, 4}, - {{&static_vtable}, 594, 4}, {{&static_vtable}, 598, 5}, - {{&static_vtable}, 603, 8}, {{&static_vtable}, 611, 16}, - {{&static_vtable}, 627, 21}, {{&static_vtable}, 648, 13}, - {{&static_vtable}, 661, 8}, {{&static_vtable}, 669, 17}, - {{&static_vtable}, 686, 13}, {{&static_vtable}, 699, 8}, - {{&static_vtable}, 707, 19}, {{&static_vtable}, 726, 13}, - {{&static_vtable}, 739, 11}, {{&static_vtable}, 750, 8}, - {{&static_vtable}, 758, 4}, {{&static_vtable}, 762, 8}, - {{&static_vtable}, 770, 12}, {{&static_vtable}, 782, 7}, - {{&static_vtable}, 789, 5}, {{&static_vtable}, 794, 4}, - {{&static_vtable}, 798, 18}, {{&static_vtable}, 816, 19}, - {{&static_vtable}, 835, 3}, {{&static_vtable}, 838, 5}, - {{&static_vtable}, 843, 7}, {{&static_vtable}, 850, 7}, - {{&static_vtable}, 857, 11}, {{&static_vtable}, 868, 7}, - {{&static_vtable}, 875, 6}, {{&static_vtable}, 881, 10}, - {{&static_vtable}, 891, 1}, {{&static_vtable}, 892, 36}, - {{&static_vtable}, 928, 11}, {{&static_vtable}, 939, 7}, - {{&static_vtable}, 946, 25}, {{&static_vtable}, 971, 2}, - {{&static_vtable}, 973, 8}, {{&static_vtable}, 981, 17}, - {{&static_vtable}, 998, 10}, {{&static_vtable}, 1008, 4}, - {{&static_vtable}, 1012, 3}, {{&static_vtable}, 1015, 16}, + {{&static_vtable}, 0, 5}, {{&static_vtable}, 5, 7}, + {{&static_vtable}, 12, 7}, {{&static_vtable}, 19, 10}, + {{&static_vtable}, 29, 7}, {{&static_vtable}, 36, 2}, + {{&static_vtable}, 38, 12}, {{&static_vtable}, 50, 11}, + {{&static_vtable}, 61, 16}, {{&static_vtable}, 77, 13}, + {{&static_vtable}, 90, 20}, {{&static_vtable}, 110, 12}, + {{&static_vtable}, 122, 30}, {{&static_vtable}, 152, 10}, + {{&static_vtable}, 162, 4}, {{&static_vtable}, 166, 8}, + {{&static_vtable}, 174, 11}, {{&static_vtable}, 185, 12}, + {{&static_vtable}, 197, 16}, {{&static_vtable}, 213, 14}, + {{&static_vtable}, 227, 0}, {{&static_vtable}, 227, 19}, + {{&static_vtable}, 246, 12}, {{&static_vtable}, 258, 30}, + {{&static_vtable}, 288, 31}, {{&static_vtable}, 319, 36}, + {{&static_vtable}, 355, 1}, {{&static_vtable}, 356, 1}, + {{&static_vtable}, 357, 1}, {{&static_vtable}, 358, 8}, + {{&static_vtable}, 366, 4}, {{&static_vtable}, 370, 7}, + {{&static_vtable}, 377, 8}, {{&static_vtable}, 385, 16}, + {{&static_vtable}, 401, 4}, {{&static_vtable}, 405, 3}, + {{&static_vtable}, 408, 3}, {{&static_vtable}, 411, 4}, + {{&static_vtable}, 415, 5}, {{&static_vtable}, 420, 4}, + {{&static_vtable}, 424, 3}, {{&static_vtable}, 427, 3}, + {{&static_vtable}, 430, 1}, {{&static_vtable}, 431, 11}, + {{&static_vtable}, 442, 3}, {{&static_vtable}, 445, 3}, + {{&static_vtable}, 448, 3}, {{&static_vtable}, 451, 3}, + {{&static_vtable}, 454, 3}, {{&static_vtable}, 457, 14}, + {{&static_vtable}, 471, 15}, {{&static_vtable}, 486, 13}, + {{&static_vtable}, 499, 15}, {{&static_vtable}, 514, 13}, + {{&static_vtable}, 527, 6}, {{&static_vtable}, 533, 27}, + {{&static_vtable}, 560, 3}, {{&static_vtable}, 563, 5}, + {{&static_vtable}, 568, 13}, {{&static_vtable}, 581, 13}, + {{&static_vtable}, 594, 19}, {{&static_vtable}, 613, 16}, + {{&static_vtable}, 629, 16}, {{&static_vtable}, 645, 14}, + {{&static_vtable}, 659, 16}, {{&static_vtable}, 675, 13}, + {{&static_vtable}, 688, 6}, {{&static_vtable}, 694, 4}, + {{&static_vtable}, 698, 4}, {{&static_vtable}, 702, 6}, + {{&static_vtable}, 708, 7}, {{&static_vtable}, 715, 4}, + {{&static_vtable}, 719, 8}, {{&static_vtable}, 727, 17}, + {{&static_vtable}, 744, 13}, {{&static_vtable}, 757, 8}, + {{&static_vtable}, 765, 19}, {{&static_vtable}, 784, 13}, + {{&static_vtable}, 797, 4}, {{&static_vtable}, 801, 8}, + {{&static_vtable}, 809, 12}, {{&static_vtable}, 821, 18}, + {{&static_vtable}, 839, 19}, {{&static_vtable}, 858, 5}, + {{&static_vtable}, 863, 7}, {{&static_vtable}, 870, 7}, + {{&static_vtable}, 877, 11}, {{&static_vtable}, 888, 6}, + {{&static_vtable}, 894, 10}, {{&static_vtable}, 904, 25}, + {{&static_vtable}, 929, 17}, {{&static_vtable}, 946, 4}, + {{&static_vtable}, 950, 3}, {{&static_vtable}, 953, 16}, + {{&static_vtable}, 969, 16}, {{&static_vtable}, 985, 13}, + {{&static_vtable}, 998, 12}, {{&static_vtable}, 1010, 21}, }; bool grpc_is_static_metadata_string(grpc_slice slice) { @@ -180,104 +180,104 @@ bool grpc_is_static_metadata_string(grpc_slice slice) { } const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = { - {.refcount = &g_refcnts[0].base, .data.refcounted = {g_bytes + 0, 1}}, - {.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 1, 1}}, - {.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 2, 1}}, - {.refcount = &g_refcnts[3].base, .data.refcounted = {g_bytes + 3, 3}}, - {.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 6, 3}}, - {.refcount = &g_refcnts[5].base, .data.refcounted = {g_bytes + 9, 3}}, - {.refcount = &g_refcnts[6].base, .data.refcounted = {g_bytes + 12, 3}}, - {.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 15, 3}}, - {.refcount = &g_refcnts[8].base, .data.refcounted = {g_bytes + 18, 3}}, - {.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 21, 3}}, - {.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 24, 6}}, - {.refcount = &g_refcnts[11].base, .data.refcounted = {g_bytes + 30, 14}}, - {.refcount = &g_refcnts[12].base, .data.refcounted = {g_bytes + 44, 15}}, - {.refcount = &g_refcnts[13].base, .data.refcounted = {g_bytes + 59, 15}}, - {.refcount = &g_refcnts[14].base, .data.refcounted = {g_bytes + 74, 13}}, - {.refcount = &g_refcnts[15].base, .data.refcounted = {g_bytes + 87, 27}}, - {.refcount = &g_refcnts[16].base, .data.refcounted = {g_bytes + 114, 3}}, - {.refcount = &g_refcnts[17].base, .data.refcounted = {g_bytes + 117, 5}}, - {.refcount = &g_refcnts[18].base, .data.refcounted = {g_bytes + 122, 16}}, - {.refcount = &g_refcnts[19].base, .data.refcounted = {g_bytes + 138, 10}}, - {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 148, 13}}, - {.refcount = &g_refcnts[21].base, .data.refcounted = {g_bytes + 161, 13}}, - {.refcount = &g_refcnts[22].base, .data.refcounted = {g_bytes + 174, 19}}, - {.refcount = &g_refcnts[23].base, .data.refcounted = {g_bytes + 193, 16}}, - {.refcount = &g_refcnts[24].base, .data.refcounted = {g_bytes + 209, 16}}, - {.refcount = &g_refcnts[25].base, .data.refcounted = {g_bytes + 225, 14}}, - {.refcount = &g_refcnts[26].base, .data.refcounted = {g_bytes + 239, 16}}, - {.refcount = &g_refcnts[27].base, .data.refcounted = {g_bytes + 255, 13}}, - {.refcount = &g_refcnts[28].base, .data.refcounted = {g_bytes + 268, 12}}, - {.refcount = &g_refcnts[29].base, .data.refcounted = {g_bytes + 280, 6}}, - {.refcount = &g_refcnts[30].base, .data.refcounted = {g_bytes + 286, 4}}, - {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 290, 7}}, - {.refcount = &g_refcnts[32].base, .data.refcounted = {g_bytes + 297, 12}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}, - {.refcount = &g_refcnts[34].base, .data.refcounted = {g_bytes + 309, 4}}, - {.refcount = &g_refcnts[35].base, .data.refcounted = {g_bytes + 313, 6}}, - {.refcount = &g_refcnts[36].base, .data.refcounted = {g_bytes + 319, 7}}, - {.refcount = &g_refcnts[37].base, .data.refcounted = {g_bytes + 326, 4}}, - {.refcount = &g_refcnts[38].base, .data.refcounted = {g_bytes + 330, 3}}, - {.refcount = &g_refcnts[39].base, .data.refcounted = {g_bytes + 333, 4}}, - {.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[41].base, .data.refcounted = {g_bytes + 357, 30}}, - {.refcount = &g_refcnts[42].base, .data.refcounted = {g_bytes + 387, 31}}, - {.refcount = &g_refcnts[43].base, .data.refcounted = {g_bytes + 418, 12}}, - {.refcount = &g_refcnts[44].base, .data.refcounted = {g_bytes + 430, 19}}, - {.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 449, 13}}, - {.refcount = &g_refcnts[46].base, .data.refcounted = {g_bytes + 462, 30}}, - {.refcount = &g_refcnts[47].base, .data.refcounted = {g_bytes + 492, 12}}, - {.refcount = &g_refcnts[48].base, .data.refcounted = {g_bytes + 504, 16}}, - {.refcount = &g_refcnts[49].base, .data.refcounted = {g_bytes + 520, 14}}, - {.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 534, 11}}, - {.refcount = &g_refcnts[51].base, .data.refcounted = {g_bytes + 545, 12}}, - {.refcount = &g_refcnts[52].base, .data.refcounted = {g_bytes + 557, 16}}, - {.refcount = &g_refcnts[53].base, .data.refcounted = {g_bytes + 573, 4}}, - {.refcount = &g_refcnts[54].base, .data.refcounted = {g_bytes + 577, 13}}, - {.refcount = &g_refcnts[55].base, .data.refcounted = {g_bytes + 590, 4}}, - {.refcount = &g_refcnts[56].base, .data.refcounted = {g_bytes + 594, 4}}, - {.refcount = &g_refcnts[57].base, .data.refcounted = {g_bytes + 598, 5}}, - {.refcount = &g_refcnts[58].base, .data.refcounted = {g_bytes + 603, 8}}, - {.refcount = &g_refcnts[59].base, .data.refcounted = {g_bytes + 611, 16}}, - {.refcount = &g_refcnts[60].base, .data.refcounted = {g_bytes + 627, 21}}, - {.refcount = &g_refcnts[61].base, .data.refcounted = {g_bytes + 648, 13}}, - {.refcount = &g_refcnts[62].base, .data.refcounted = {g_bytes + 661, 8}}, - {.refcount = &g_refcnts[63].base, .data.refcounted = {g_bytes + 669, 17}}, - {.refcount = &g_refcnts[64].base, .data.refcounted = {g_bytes + 686, 13}}, - {.refcount = &g_refcnts[65].base, .data.refcounted = {g_bytes + 699, 8}}, - {.refcount = &g_refcnts[66].base, .data.refcounted = {g_bytes + 707, 19}}, - {.refcount = &g_refcnts[67].base, .data.refcounted = {g_bytes + 726, 13}}, - {.refcount = &g_refcnts[68].base, .data.refcounted = {g_bytes + 739, 11}}, - {.refcount = &g_refcnts[69].base, .data.refcounted = {g_bytes + 750, 8}}, - {.refcount = &g_refcnts[70].base, .data.refcounted = {g_bytes + 758, 4}}, - {.refcount = &g_refcnts[71].base, .data.refcounted = {g_bytes + 762, 8}}, - {.refcount = &g_refcnts[72].base, .data.refcounted = {g_bytes + 770, 12}}, - {.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 782, 7}}, - {.refcount = &g_refcnts[74].base, .data.refcounted = {g_bytes + 789, 5}}, - {.refcount = &g_refcnts[75].base, .data.refcounted = {g_bytes + 794, 4}}, - {.refcount = &g_refcnts[76].base, .data.refcounted = {g_bytes + 798, 18}}, - {.refcount = &g_refcnts[77].base, .data.refcounted = {g_bytes + 816, 19}}, - {.refcount = &g_refcnts[78].base, .data.refcounted = {g_bytes + 835, 3}}, - {.refcount = &g_refcnts[79].base, .data.refcounted = {g_bytes + 838, 5}}, - {.refcount = &g_refcnts[80].base, .data.refcounted = {g_bytes + 843, 7}}, - {.refcount = &g_refcnts[81].base, .data.refcounted = {g_bytes + 850, 7}}, - {.refcount = &g_refcnts[82].base, .data.refcounted = {g_bytes + 857, 11}}, - {.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 868, 7}}, - {.refcount = &g_refcnts[84].base, .data.refcounted = {g_bytes + 875, 6}}, - {.refcount = &g_refcnts[85].base, .data.refcounted = {g_bytes + 881, 10}}, - {.refcount = &g_refcnts[86].base, .data.refcounted = {g_bytes + 891, 1}}, - {.refcount = &g_refcnts[87].base, .data.refcounted = {g_bytes + 892, 36}}, - {.refcount = &g_refcnts[88].base, .data.refcounted = {g_bytes + 928, 11}}, - {.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[90].base, .data.refcounted = {g_bytes + 946, 25}}, - {.refcount = &g_refcnts[91].base, .data.refcounted = {g_bytes + 971, 2}}, - {.refcount = &g_refcnts[92].base, .data.refcounted = {g_bytes + 973, 8}}, - {.refcount = &g_refcnts[93].base, .data.refcounted = {g_bytes + 981, 17}}, - {.refcount = &g_refcnts[94].base, .data.refcounted = {g_bytes + 998, 10}}, - {.refcount = &g_refcnts[95].base, .data.refcounted = {g_bytes + 1008, 4}}, - {.refcount = &g_refcnts[96].base, .data.refcounted = {g_bytes + 1012, 3}}, - {.refcount = &g_refcnts[97].base, .data.refcounted = {g_bytes + 1015, 16}}, + {.refcount = &g_refcnts[0].base, .data.refcounted = {g_bytes + 0, 5}}, + {.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 5, 7}}, + {.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[3].base, .data.refcounted = {g_bytes + 19, 10}}, + {.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 29, 7}}, + {.refcount = &g_refcnts[5].base, .data.refcounted = {g_bytes + 36, 2}}, + {.refcount = &g_refcnts[6].base, .data.refcounted = {g_bytes + 38, 12}}, + {.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 50, 11}}, + {.refcount = &g_refcnts[8].base, .data.refcounted = {g_bytes + 61, 16}}, + {.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 77, 13}}, + {.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[11].base, .data.refcounted = {g_bytes + 110, 12}}, + {.refcount = &g_refcnts[12].base, .data.refcounted = {g_bytes + 122, 30}}, + {.refcount = &g_refcnts[13].base, .data.refcounted = {g_bytes + 152, 10}}, + {.refcount = &g_refcnts[14].base, .data.refcounted = {g_bytes + 162, 4}}, + {.refcount = &g_refcnts[15].base, .data.refcounted = {g_bytes + 166, 8}}, + {.refcount = &g_refcnts[16].base, .data.refcounted = {g_bytes + 174, 11}}, + {.refcount = &g_refcnts[17].base, .data.refcounted = {g_bytes + 185, 12}}, + {.refcount = &g_refcnts[18].base, .data.refcounted = {g_bytes + 197, 16}}, + {.refcount = &g_refcnts[19].base, .data.refcounted = {g_bytes + 213, 14}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}, + {.refcount = &g_refcnts[21].base, .data.refcounted = {g_bytes + 227, 19}}, + {.refcount = &g_refcnts[22].base, .data.refcounted = {g_bytes + 246, 12}}, + {.refcount = &g_refcnts[23].base, .data.refcounted = {g_bytes + 258, 30}}, + {.refcount = &g_refcnts[24].base, .data.refcounted = {g_bytes + 288, 31}}, + {.refcount = &g_refcnts[25].base, .data.refcounted = {g_bytes + 319, 36}}, + {.refcount = &g_refcnts[26].base, .data.refcounted = {g_bytes + 355, 1}}, + {.refcount = &g_refcnts[27].base, .data.refcounted = {g_bytes + 356, 1}}, + {.refcount = &g_refcnts[28].base, .data.refcounted = {g_bytes + 357, 1}}, + {.refcount = &g_refcnts[29].base, .data.refcounted = {g_bytes + 358, 8}}, + {.refcount = &g_refcnts[30].base, .data.refcounted = {g_bytes + 366, 4}}, + {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 370, 7}}, + {.refcount = &g_refcnts[32].base, .data.refcounted = {g_bytes + 377, 8}}, + {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 385, 16}}, + {.refcount = &g_refcnts[34].base, .data.refcounted = {g_bytes + 401, 4}}, + {.refcount = &g_refcnts[35].base, .data.refcounted = {g_bytes + 405, 3}}, + {.refcount = &g_refcnts[36].base, .data.refcounted = {g_bytes + 408, 3}}, + {.refcount = &g_refcnts[37].base, .data.refcounted = {g_bytes + 411, 4}}, + {.refcount = &g_refcnts[38].base, .data.refcounted = {g_bytes + 415, 5}}, + {.refcount = &g_refcnts[39].base, .data.refcounted = {g_bytes + 420, 4}}, + {.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 424, 3}}, + {.refcount = &g_refcnts[41].base, .data.refcounted = {g_bytes + 427, 3}}, + {.refcount = &g_refcnts[42].base, .data.refcounted = {g_bytes + 430, 1}}, + {.refcount = &g_refcnts[43].base, .data.refcounted = {g_bytes + 431, 11}}, + {.refcount = &g_refcnts[44].base, .data.refcounted = {g_bytes + 442, 3}}, + {.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 445, 3}}, + {.refcount = &g_refcnts[46].base, .data.refcounted = {g_bytes + 448, 3}}, + {.refcount = &g_refcnts[47].base, .data.refcounted = {g_bytes + 451, 3}}, + {.refcount = &g_refcnts[48].base, .data.refcounted = {g_bytes + 454, 3}}, + {.refcount = &g_refcnts[49].base, .data.refcounted = {g_bytes + 457, 14}}, + {.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 471, 15}}, + {.refcount = &g_refcnts[51].base, .data.refcounted = {g_bytes + 486, 13}}, + {.refcount = &g_refcnts[52].base, .data.refcounted = {g_bytes + 499, 15}}, + {.refcount = &g_refcnts[53].base, .data.refcounted = {g_bytes + 514, 13}}, + {.refcount = &g_refcnts[54].base, .data.refcounted = {g_bytes + 527, 6}}, + {.refcount = &g_refcnts[55].base, .data.refcounted = {g_bytes + 533, 27}}, + {.refcount = &g_refcnts[56].base, .data.refcounted = {g_bytes + 560, 3}}, + {.refcount = &g_refcnts[57].base, .data.refcounted = {g_bytes + 563, 5}}, + {.refcount = &g_refcnts[58].base, .data.refcounted = {g_bytes + 568, 13}}, + {.refcount = &g_refcnts[59].base, .data.refcounted = {g_bytes + 581, 13}}, + {.refcount = &g_refcnts[60].base, .data.refcounted = {g_bytes + 594, 19}}, + {.refcount = &g_refcnts[61].base, .data.refcounted = {g_bytes + 613, 16}}, + {.refcount = &g_refcnts[62].base, .data.refcounted = {g_bytes + 629, 16}}, + {.refcount = &g_refcnts[63].base, .data.refcounted = {g_bytes + 645, 14}}, + {.refcount = &g_refcnts[64].base, .data.refcounted = {g_bytes + 659, 16}}, + {.refcount = &g_refcnts[65].base, .data.refcounted = {g_bytes + 675, 13}}, + {.refcount = &g_refcnts[66].base, .data.refcounted = {g_bytes + 688, 6}}, + {.refcount = &g_refcnts[67].base, .data.refcounted = {g_bytes + 694, 4}}, + {.refcount = &g_refcnts[68].base, .data.refcounted = {g_bytes + 698, 4}}, + {.refcount = &g_refcnts[69].base, .data.refcounted = {g_bytes + 702, 6}}, + {.refcount = &g_refcnts[70].base, .data.refcounted = {g_bytes + 708, 7}}, + {.refcount = &g_refcnts[71].base, .data.refcounted = {g_bytes + 715, 4}}, + {.refcount = &g_refcnts[72].base, .data.refcounted = {g_bytes + 719, 8}}, + {.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 727, 17}}, + {.refcount = &g_refcnts[74].base, .data.refcounted = {g_bytes + 744, 13}}, + {.refcount = &g_refcnts[75].base, .data.refcounted = {g_bytes + 757, 8}}, + {.refcount = &g_refcnts[76].base, .data.refcounted = {g_bytes + 765, 19}}, + {.refcount = &g_refcnts[77].base, .data.refcounted = {g_bytes + 784, 13}}, + {.refcount = &g_refcnts[78].base, .data.refcounted = {g_bytes + 797, 4}}, + {.refcount = &g_refcnts[79].base, .data.refcounted = {g_bytes + 801, 8}}, + {.refcount = &g_refcnts[80].base, .data.refcounted = {g_bytes + 809, 12}}, + {.refcount = &g_refcnts[81].base, .data.refcounted = {g_bytes + 821, 18}}, + {.refcount = &g_refcnts[82].base, .data.refcounted = {g_bytes + 839, 19}}, + {.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 858, 5}}, + {.refcount = &g_refcnts[84].base, .data.refcounted = {g_bytes + 863, 7}}, + {.refcount = &g_refcnts[85].base, .data.refcounted = {g_bytes + 870, 7}}, + {.refcount = &g_refcnts[86].base, .data.refcounted = {g_bytes + 877, 11}}, + {.refcount = &g_refcnts[87].base, .data.refcounted = {g_bytes + 888, 6}}, + {.refcount = &g_refcnts[88].base, .data.refcounted = {g_bytes + 894, 10}}, + {.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 904, 25}}, + {.refcount = &g_refcnts[90].base, .data.refcounted = {g_bytes + 929, 17}}, + {.refcount = &g_refcnts[91].base, .data.refcounted = {g_bytes + 946, 4}}, + {.refcount = &g_refcnts[92].base, .data.refcounted = {g_bytes + 950, 3}}, + {.refcount = &g_refcnts[93].base, .data.refcounted = {g_bytes + 953, 16}}, + {.refcount = &g_refcnts[94].base, .data.refcounted = {g_bytes + 969, 16}}, + {.refcount = &g_refcnts[95].base, .data.refcounted = {g_bytes + 985, 13}}, + {.refcount = &g_refcnts[96].base, .data.refcounted = {g_bytes + 998, 12}}, + {.refcount = &g_refcnts[97].base, .data.refcounted = {g_bytes + 1010, 21}}, }; int grpc_static_metadata_index(grpc_slice slice) { @@ -290,9 +290,9 @@ int grpc_static_metadata_index(grpc_slice slice) { 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, 4, 8, 6, 2, 4, 8, 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, 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}; #define ELEMS_PHASHLEN 0x40 #define ELEMS_PHASHNKEYS 81 @@ -300,14 +300,14 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { #define ELEMS_PHASHSALT 0x9e3779b9 static const uint8_t elems_tab[] = { - 0, 17, 61, 28, 4, 12, 47, 0, 0, 0, 61, 0, 47, 0, 61, 76, - 61, 70, 76, 0, 0, 10, 4, 60, 0, 0, 0, 16, 88, 47, 1, 76, - 76, 0, 76, 0, 61, 0, 23, 0, 0, 51, 1, 92, 32, 0, 25, 0, - 34, 0, 37, 0, 76, 76, 32, 38, 70, 79, 81, 0, 64, 0, 0, 0, + 20, 1, 0, 61, 61, 34, 10, 16, 0, 0, 0, 0, 34, 61, 0, 1, + 0, 0, 0, 61, 0, 88, 0, 4, 0, 47, 0, 47, 12, 7, 0, 16, + 51, 87, 76, 4, 79, 10, 70, 47, 76, 61, 71, 88, 0, 88, 0, 47, + 0, 16, 0, 83, 0, 57, 0, 75, 0, 42, 0, 90, 0, 42, 70, 0, }; static uint32_t elems_phash(uint32_t val) { - val -= 917; + val += (uint32_t)-11; uint32_t a, b, rsl; @@ -318,23 +318,23 @@ static uint32_t elems_phash(uint32_t val) { } static const uint16_t elem_keys[] = { - 2091, 1405, 8728, 2777, 7192, 2287, 2581, 2483, 2973, 4441, 3561, 3951, - 6403, 4463, 9441, 8726, 2875, 5423, 8730, 7338, 6109, 6207, 6697, 6893, - 7229, 8363, 8729, 3952, 8173, 8191, 8725, 8853, 9245, 9343, 1601, 8727, - 7481, 7340, 7971, 7775, 6501, 3973, 3659, 3979, 3463, 3980, 1307, 8190, - 9010, 8731, 4901, 6599, 3365, 7579, 6795, 9147, 9539, 8069, 6305, 7873, - 1209, 1111, 1699, 1503, 7089, 4468, 2189, 4900, 7232, 2385, 6991, 3978, - 1993, 4902, 2679, 2762, 1013, 3981, 1230, 1895, 8265, 0, 0, 0, + 138, 522, 714, 5116, 1098, 430, 5802, 232, 8840, 913, 240, 8644, + 231, 8742, 7762, 1392, 42, 5410, 4822, 5998, 139, 1490, 5900, 7664, + 6292, 8448, 6684, 7272, 7370, 8350, 8154, 7958, 7566, 912, 9036, 7860, + 6488, 8546, 1111, 9134, 712, 5214, 132, 1074, 1010, 5312, 314, 242, + 8252, 4951, 8938, 43, 7076, 6096, 6586, 6194, 1294, 1076, 5606, 1588, + 5704, 244, 911, 5508, 6390, 7174, 6880, 1077, 713, 1009, 241, 8056, + 1075, 6782, 7468, 4920, 243, 429, 431, 1011, 6978, 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}; static const uint8_t elem_idxs[] = { - 11, 5, 70, 19, 51, 13, 16, 15, 21, 33, 24, 26, 43, 34, 79, 68, 20, - 39, 72, 54, 40, 41, 46, 48, 52, 66, 71, 27, 62, 64, 67, 74, 77, 78, - 7, 69, 56, 55, 60, 58, 44, 28, 25, 30, 23, 31, 4, 63, 75, 73, 37, - 45, 22, 57, 47, 76, 80, 61, 42, 59, 2, 0, 8, 6, 50, 35, 12, 36, - 53, 14, 49, 29, 10, 38, 17, 18, 1, 32, 3, 9, 65}; + 15, 6, 2, 27, 41, 12, 34, 10, 69, 5, 19, 67, 9, 68, 58, 48, 17, + 30, 24, 36, 16, 55, 35, 57, 39, 65, 44, 51, 52, 64, 62, 60, 54, 4, + 72, 59, 42, 66, 7, 73, 0, 28, 8, 76, 77, 29, 14, 21, 63, 26, 71, + 18, 49, 37, 43, 38, 70, 79, 32, 56, 33, 23, 3, 31, 40, 50, 46, 80, + 1, 74, 20, 61, 78, 45, 53, 25, 22, 11, 13, 75, 47}; grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) { if (a == -1 || b == -1) return GRPC_MDNULL; @@ -347,168 +347,203 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) { } grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { - {{.refcount = &g_refcnts[11].base, .data.refcounted = {g_bytes + 30, 14}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 24, 6}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[12].base, .data.refcounted = {g_bytes + 44, 15}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[12].base, .data.refcounted = {g_bytes + 44, 15}}, - {.refcount = &g_refcnts[54].base, .data.refcounted = {g_bytes + 577, 13}}}, - {{.refcount = &g_refcnts[13].base, .data.refcounted = {g_bytes + 59, 15}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[14].base, .data.refcounted = {g_bytes + 74, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[15].base, .data.refcounted = {g_bytes + 87, 27}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[16].base, .data.refcounted = {g_bytes + 114, 3}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[17].base, .data.refcounted = {g_bytes + 117, 5}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[19].base, .data.refcounted = {g_bytes + 138, 10}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 148, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[21].base, .data.refcounted = {g_bytes + 161, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[22].base, .data.refcounted = {g_bytes + 174, 19}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[23].base, .data.refcounted = {g_bytes + 193, 16}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[24].base, .data.refcounted = {g_bytes + 209, 16}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[25].base, .data.refcounted = {g_bytes + 225, 14}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[26].base, .data.refcounted = {g_bytes + 239, 16}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[27].base, .data.refcounted = {g_bytes + 255, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[28].base, .data.refcounted = {g_bytes + 268, 12}}, - {.refcount = &g_refcnts[18].base, .data.refcounted = {g_bytes + 122, 16}}}, - {{.refcount = &g_refcnts[28].base, .data.refcounted = {g_bytes + 268, 12}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[29].base, .data.refcounted = {g_bytes + 280, 6}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[30].base, .data.refcounted = {g_bytes + 286, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[34].base, .data.refcounted = {g_bytes + 309, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[35].base, .data.refcounted = {g_bytes + 313, 6}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[36].base, .data.refcounted = {g_bytes + 319, 7}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[37].base, .data.refcounted = {g_bytes + 326, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 290, 7}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[32].base, .data.refcounted = {g_bytes + 297, 12}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[53].base, .data.refcounted = {g_bytes + 573, 4}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[58].base, .data.refcounted = {g_bytes + 603, 8}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[59].base, .data.refcounted = {g_bytes + 611, 16}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[60].base, .data.refcounted = {g_bytes + 627, 21}}}, - {{.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 337, 20}}, - {.refcount = &g_refcnts[61].base, .data.refcounted = {g_bytes + 648, 13}}}, - {{.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 449, 13}}, - {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 290, 7}}}, - {{.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 449, 13}}, - {.refcount = &g_refcnts[53].base, .data.refcounted = {g_bytes + 573, 4}}}, - {{.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 449, 13}}, - {.refcount = &g_refcnts[58].base, .data.refcounted = {g_bytes + 603, 8}}}, - {{.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 534, 11}}, - {.refcount = &g_refcnts[0].base, .data.refcounted = {g_bytes + 0, 1}}}, - {{.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 534, 11}}, - {.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 1, 1}}}, - {{.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 534, 11}}, - {.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 2, 1}}}, - {{.refcount = &g_refcnts[55].base, .data.refcounted = {g_bytes + 590, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[62].base, .data.refcounted = {g_bytes + 661, 8}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[63].base, .data.refcounted = {g_bytes + 669, 17}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[64].base, .data.refcounted = {g_bytes + 686, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[65].base, .data.refcounted = {g_bytes + 699, 8}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[66].base, .data.refcounted = {g_bytes + 707, 19}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[67].base, .data.refcounted = {g_bytes + 726, 13}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[68].base, .data.refcounted = {g_bytes + 739, 11}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[69].base, .data.refcounted = {g_bytes + 750, 8}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[70].base, .data.refcounted = {g_bytes + 758, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[71].base, .data.refcounted = {g_bytes + 762, 8}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[72].base, .data.refcounted = {g_bytes + 770, 12}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 782, 7}}, - {.refcount = &g_refcnts[38].base, .data.refcounted = {g_bytes + 330, 3}}}, - {{.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 782, 7}}, - {.refcount = &g_refcnts[75].base, .data.refcounted = {g_bytes + 794, 4}}}, - {{.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 782, 7}}, - {.refcount = &g_refcnts[78].base, .data.refcounted = {g_bytes + 835, 3}}}, - {{.refcount = &g_refcnts[74].base, .data.refcounted = {g_bytes + 789, 5}}, - {.refcount = &g_refcnts[86].base, .data.refcounted = {g_bytes + 891, 1}}}, - {{.refcount = &g_refcnts[74].base, .data.refcounted = {g_bytes + 789, 5}}, - {.refcount = &g_refcnts[88].base, .data.refcounted = {g_bytes + 928, 11}}}, - {{.refcount = &g_refcnts[76].base, .data.refcounted = {g_bytes + 798, 18}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[77].base, .data.refcounted = {g_bytes + 816, 19}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[79].base, .data.refcounted = {g_bytes + 838, 5}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[80].base, .data.refcounted = {g_bytes + 843, 7}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[81].base, .data.refcounted = {g_bytes + 850, 7}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[82].base, .data.refcounted = {g_bytes + 857, 11}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 868, 7}}, - {.refcount = &g_refcnts[39].base, .data.refcounted = {g_bytes + 333, 4}}}, - {{.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 868, 7}}, - {.refcount = &g_refcnts[56].base, .data.refcounted = {g_bytes + 594, 4}}}, - {{.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 868, 7}}, - {.refcount = &g_refcnts[57].base, .data.refcounted = {g_bytes + 598, 5}}}, - {{.refcount = &g_refcnts[84].base, .data.refcounted = {g_bytes + 875, 6}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[85].base, .data.refcounted = {g_bytes + 881, 10}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[3].base, .data.refcounted = {g_bytes + 3, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 6, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[5].base, .data.refcounted = {g_bytes + 9, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[6].base, .data.refcounted = {g_bytes + 12, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 15, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[8].base, .data.refcounted = {g_bytes + 18, 3}}}, - {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 939, 7}}, - {.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 21, 3}}}, - {{.refcount = &g_refcnts[90].base, .data.refcounted = {g_bytes + 946, 25}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[91].base, .data.refcounted = {g_bytes + 971, 2}}, - {.refcount = &g_refcnts[92].base, .data.refcounted = {g_bytes + 973, 8}}}, - {{.refcount = &g_refcnts[93].base, .data.refcounted = {g_bytes + 981, 17}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[94].base, .data.refcounted = {g_bytes + 998, 10}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[95].base, .data.refcounted = {g_bytes + 1008, 4}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[96].base, .data.refcounted = {g_bytes + 1012, 3}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, - {{.refcount = &g_refcnts[97].base, .data.refcounted = {g_bytes + 1015, 16}}, - {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 309, 0}}}, + {{.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 50, 11}}, + {.refcount = &g_refcnts[26].base, .data.refcounted = {g_bytes + 355, 1}}}, + {{.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 50, 11}}, + {.refcount = &g_refcnts[27].base, .data.refcounted = {g_bytes + 356, 1}}}, + {{.refcount = &g_refcnts[7].base, .data.refcounted = {g_bytes + 50, 11}}, + {.refcount = &g_refcnts[28].base, .data.refcounted = {g_bytes + 357, 1}}}, + {{.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 77, 13}}, + {.refcount = &g_refcnts[29].base, .data.refcounted = {g_bytes + 358, 8}}}, + {{.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 77, 13}}, + {.refcount = &g_refcnts[30].base, .data.refcounted = {g_bytes + 366, 4}}}, + {{.refcount = &g_refcnts[9].base, .data.refcounted = {g_bytes + 77, 13}}, + {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 370, 7}}}, + {{.refcount = &g_refcnts[5].base, .data.refcounted = {g_bytes + 36, 2}}, + {.refcount = &g_refcnts[32].base, .data.refcounted = {g_bytes + 377, 8}}}, + {{.refcount = &g_refcnts[11].base, .data.refcounted = {g_bytes + 110, 12}}, + {.refcount = &g_refcnts[33].base, .data.refcounted = {g_bytes + 385, 16}}}, + {{.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 5, 7}}, + {.refcount = &g_refcnts[34].base, .data.refcounted = {g_bytes + 401, 4}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[35].base, .data.refcounted = {g_bytes + 405, 3}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[36].base, .data.refcounted = {g_bytes + 408, 3}}}, + {{.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 29, 7}}, + {.refcount = &g_refcnts[37].base, .data.refcounted = {g_bytes + 411, 4}}}, + {{.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 29, 7}}, + {.refcount = &g_refcnts[38].base, .data.refcounted = {g_bytes + 415, 5}}}, + {{.refcount = &g_refcnts[4].base, .data.refcounted = {g_bytes + 29, 7}}, + {.refcount = &g_refcnts[39].base, .data.refcounted = {g_bytes + 420, 4}}}, + {{.refcount = &g_refcnts[3].base, .data.refcounted = {g_bytes + 19, 10}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 5, 7}}, + {.refcount = &g_refcnts[40].base, .data.refcounted = {g_bytes + 424, 3}}}, + {{.refcount = &g_refcnts[1].base, .data.refcounted = {g_bytes + 5, 7}}, + {.refcount = &g_refcnts[41].base, .data.refcounted = {g_bytes + 427, 3}}}, + {{.refcount = &g_refcnts[0].base, .data.refcounted = {g_bytes + 0, 5}}, + {.refcount = &g_refcnts[42].base, .data.refcounted = {g_bytes + 430, 1}}}, + {{.refcount = &g_refcnts[0].base, .data.refcounted = {g_bytes + 0, 5}}, + {.refcount = &g_refcnts[43].base, .data.refcounted = {g_bytes + 431, 11}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[44].base, .data.refcounted = {g_bytes + 442, 3}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[45].base, .data.refcounted = {g_bytes + 445, 3}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[46].base, .data.refcounted = {g_bytes + 448, 3}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[47].base, .data.refcounted = {g_bytes + 451, 3}}}, + {{.refcount = &g_refcnts[2].base, .data.refcounted = {g_bytes + 12, 7}}, + {.refcount = &g_refcnts[48].base, .data.refcounted = {g_bytes + 454, 3}}}, + {{.refcount = &g_refcnts[49].base, .data.refcounted = {g_bytes + 457, 14}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 471, 15}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[50].base, .data.refcounted = {g_bytes + 471, 15}}, + {.refcount = &g_refcnts[51].base, .data.refcounted = {g_bytes + 486, 13}}}, + {{.refcount = &g_refcnts[52].base, .data.refcounted = {g_bytes + 499, 15}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[53].base, .data.refcounted = {g_bytes + 514, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[54].base, .data.refcounted = {g_bytes + 527, 6}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[55].base, .data.refcounted = {g_bytes + 533, 27}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[56].base, .data.refcounted = {g_bytes + 560, 3}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[57].base, .data.refcounted = {g_bytes + 563, 5}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[58].base, .data.refcounted = {g_bytes + 568, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[59].base, .data.refcounted = {g_bytes + 581, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[60].base, .data.refcounted = {g_bytes + 594, 19}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[61].base, .data.refcounted = {g_bytes + 613, 16}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[62].base, .data.refcounted = {g_bytes + 629, 16}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[63].base, .data.refcounted = {g_bytes + 645, 14}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[64].base, .data.refcounted = {g_bytes + 659, 16}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[65].base, .data.refcounted = {g_bytes + 675, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[11].base, .data.refcounted = {g_bytes + 110, 12}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[66].base, .data.refcounted = {g_bytes + 688, 6}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[67].base, .data.refcounted = {g_bytes + 694, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[68].base, .data.refcounted = {g_bytes + 698, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[69].base, .data.refcounted = {g_bytes + 702, 6}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[70].base, .data.refcounted = {g_bytes + 708, 7}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[71].base, .data.refcounted = {g_bytes + 715, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[14].base, .data.refcounted = {g_bytes + 162, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[72].base, .data.refcounted = {g_bytes + 719, 8}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[73].base, .data.refcounted = {g_bytes + 727, 17}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[74].base, .data.refcounted = {g_bytes + 744, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[75].base, .data.refcounted = {g_bytes + 757, 8}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[76].base, .data.refcounted = {g_bytes + 765, 19}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[77].base, .data.refcounted = {g_bytes + 784, 13}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[15].base, .data.refcounted = {g_bytes + 166, 8}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[16].base, .data.refcounted = {g_bytes + 174, 11}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[78].base, .data.refcounted = {g_bytes + 797, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[79].base, .data.refcounted = {g_bytes + 801, 8}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[80].base, .data.refcounted = {g_bytes + 809, 12}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[81].base, .data.refcounted = {g_bytes + 821, 18}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[82].base, .data.refcounted = {g_bytes + 839, 19}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[83].base, .data.refcounted = {g_bytes + 858, 5}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[84].base, .data.refcounted = {g_bytes + 863, 7}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[85].base, .data.refcounted = {g_bytes + 870, 7}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[86].base, .data.refcounted = {g_bytes + 877, 11}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[87].base, .data.refcounted = {g_bytes + 888, 6}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[88].base, .data.refcounted = {g_bytes + 894, 10}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[89].base, .data.refcounted = {g_bytes + 904, 25}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[90].base, .data.refcounted = {g_bytes + 929, 17}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[13].base, .data.refcounted = {g_bytes + 152, 10}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[91].base, .data.refcounted = {g_bytes + 946, 4}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[92].base, .data.refcounted = {g_bytes + 950, 3}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[93].base, .data.refcounted = {g_bytes + 953, 16}}, + {.refcount = &g_refcnts[20].base, .data.refcounted = {g_bytes + 227, 0}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[29].base, .data.refcounted = {g_bytes + 358, 8}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[31].base, .data.refcounted = {g_bytes + 370, 7}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[94].base, .data.refcounted = {g_bytes + 969, 16}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[30].base, .data.refcounted = {g_bytes + 366, 4}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[95].base, .data.refcounted = {g_bytes + 985, 13}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[96].base, .data.refcounted = {g_bytes + 998, 12}}}, + {{.refcount = &g_refcnts[10].base, .data.refcounted = {g_bytes + 90, 20}}, + {.refcount = &g_refcnts[97].base, + .data.refcounted = {g_bytes + 1010, 21}}}, +}; +#define BATCH_PHASHLEN 0x10 +#define BATCH_PHASHNKEYS 17 +#define BATCH_PHASHRANGE 32 +#define BATCH_PHASHSALT 0x9e3779b9 + +static const uint8_t batch_tab[] = { + 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 15, 0, 13, 0, 23, }; -const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 29, 26, 30, - 28, 32, 27, 31}; + +static uint32_t batch_phash(uint32_t val) { + val += (uint32_t)0; + + uint32_t a, b, rsl; + + b = (val & 0xf); + a = ((val << 27) >> 28); + rsl = (a ^ batch_tab[b]); + return rsl; +} + +static const uint8_t batch_hash_to_idx[] = { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 9, 11, 13, 3, 1, 7, 5, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +grpc_metadata_batch_callouts_index grpc_batch_index_of(grpc_slice slice) { + if (!grpc_is_static_metadata_string(slice)) return GRPC_BATCH_CALLOUTS_COUNT; + uint32_t idx = (uint32_t)grpc_static_metadata_index(slice); + uint32_t hash = batch_phash(idx); + if (hash < GPR_ARRAY_SIZE(batch_hash_to_idx) && + batch_hash_to_idx[hash] == idx) + return (grpc_metadata_batch_callouts_index)hash; + return GRPC_BATCH_CALLOUTS_COUNT; +} + +const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 74, 75, 76, + 77, 78, 79, 80}; diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 3d3911de16..82af892633 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -46,206 +46,206 @@ #define GRPC_STATIC_MDSTR_COUNT 98 extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT]; +/* ":path" */ +#define GRPC_MDSTR_PATH (grpc_static_slice_table[0]) +/* ":method" */ +#define GRPC_MDSTR_METHOD (grpc_static_slice_table[1]) +/* ":status" */ +#define GRPC_MDSTR_STATUS (grpc_static_slice_table[2]) +/* ":authority" */ +#define GRPC_MDSTR_AUTHORITY (grpc_static_slice_table[3]) +/* ":scheme" */ +#define GRPC_MDSTR_SCHEME (grpc_static_slice_table[4]) +/* "te" */ +#define GRPC_MDSTR_TE (grpc_static_slice_table[5]) +/* "grpc-message" */ +#define GRPC_MDSTR_GRPC_MESSAGE (grpc_static_slice_table[6]) +/* "grpc-status" */ +#define GRPC_MDSTR_GRPC_STATUS (grpc_static_slice_table[7]) +/* "grpc-payload-bin" */ +#define GRPC_MDSTR_GRPC_PAYLOAD_BIN (grpc_static_slice_table[8]) +/* "grpc-encoding" */ +#define GRPC_MDSTR_GRPC_ENCODING (grpc_static_slice_table[9]) +/* "grpc-accept-encoding" */ +#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (grpc_static_slice_table[10]) +/* "content-type" */ +#define GRPC_MDSTR_CONTENT_TYPE (grpc_static_slice_table[11]) +/* "grpc-internal-encoding-request" */ +#define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (grpc_static_slice_table[12]) +/* "user-agent" */ +#define GRPC_MDSTR_USER_AGENT (grpc_static_slice_table[13]) +/* "host" */ +#define GRPC_MDSTR_HOST (grpc_static_slice_table[14]) +/* "lb-token" */ +#define GRPC_MDSTR_LB_TOKEN (grpc_static_slice_table[15]) +/* "lb-cost-bin" */ +#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[16]) +/* "grpc-timeout" */ +#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table[17]) +/* "grpc-tracing-bin" */ +#define GRPC_MDSTR_GRPC_TRACING_BIN (grpc_static_slice_table[18]) +/* "grpc-stats-bin" */ +#define GRPC_MDSTR_GRPC_STATS_BIN (grpc_static_slice_table[19]) +/* "" */ +#define GRPC_MDSTR_EMPTY (grpc_static_slice_table[20]) +/* "grpc.wait_for_ready" */ +#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table[21]) +/* "grpc.timeout" */ +#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table[22]) +/* "grpc.max_request_message_bytes" */ +#define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \ + (grpc_static_slice_table[23]) +/* "grpc.max_response_message_bytes" */ +#define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \ + (grpc_static_slice_table[24]) +/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ +#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ + (grpc_static_slice_table[25]) /* "0" */ -#define GRPC_MDSTR_0 (grpc_static_slice_table[0]) +#define GRPC_MDSTR_0 (grpc_static_slice_table[26]) /* "1" */ -#define GRPC_MDSTR_1 (grpc_static_slice_table[1]) +#define GRPC_MDSTR_1 (grpc_static_slice_table[27]) /* "2" */ -#define GRPC_MDSTR_2 (grpc_static_slice_table[2]) +#define GRPC_MDSTR_2 (grpc_static_slice_table[28]) +/* "identity" */ +#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[29]) +/* "gzip" */ +#define GRPC_MDSTR_GZIP (grpc_static_slice_table[30]) +/* "deflate" */ +#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[31]) +/* "trailers" */ +#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[32]) +/* "application/grpc" */ +#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[33]) +/* "POST" */ +#define GRPC_MDSTR_POST (grpc_static_slice_table[34]) /* "200" */ -#define GRPC_MDSTR_200 (grpc_static_slice_table[3]) +#define GRPC_MDSTR_200 (grpc_static_slice_table[35]) +/* "404" */ +#define GRPC_MDSTR_404 (grpc_static_slice_table[36]) +/* "http" */ +#define GRPC_MDSTR_HTTP (grpc_static_slice_table[37]) +/* "https" */ +#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[38]) +/* "grpc" */ +#define GRPC_MDSTR_GRPC (grpc_static_slice_table[39]) +/* "GET" */ +#define GRPC_MDSTR_GET (grpc_static_slice_table[40]) +/* "PUT" */ +#define GRPC_MDSTR_PUT (grpc_static_slice_table[41]) +/* "/" */ +#define GRPC_MDSTR_SLASH (grpc_static_slice_table[42]) +/* "/index.html" */ +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[43]) /* "204" */ -#define GRPC_MDSTR_204 (grpc_static_slice_table[4]) +#define GRPC_MDSTR_204 (grpc_static_slice_table[44]) /* "206" */ -#define GRPC_MDSTR_206 (grpc_static_slice_table[5]) +#define GRPC_MDSTR_206 (grpc_static_slice_table[45]) /* "304" */ -#define GRPC_MDSTR_304 (grpc_static_slice_table[6]) +#define GRPC_MDSTR_304 (grpc_static_slice_table[46]) /* "400" */ -#define GRPC_MDSTR_400 (grpc_static_slice_table[7]) -/* "404" */ -#define GRPC_MDSTR_404 (grpc_static_slice_table[8]) +#define GRPC_MDSTR_400 (grpc_static_slice_table[47]) /* "500" */ -#define GRPC_MDSTR_500 (grpc_static_slice_table[9]) -/* "accept" */ -#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[10]) +#define GRPC_MDSTR_500 (grpc_static_slice_table[48]) /* "accept-charset" */ -#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[11]) +#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[49]) /* "accept-encoding" */ -#define GRPC_MDSTR_ACCEPT_ENCODING (grpc_static_slice_table[12]) +#define GRPC_MDSTR_ACCEPT_ENCODING (grpc_static_slice_table[50]) +/* "gzip, deflate" */ +#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[51]) /* "accept-language" */ -#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[13]) +#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[52]) /* "accept-ranges" */ -#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[14]) +#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[53]) +/* "accept" */ +#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[54]) /* "access-control-allow-origin" */ -#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[15]) +#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[55]) /* "age" */ -#define GRPC_MDSTR_AGE (grpc_static_slice_table[16]) +#define GRPC_MDSTR_AGE (grpc_static_slice_table[56]) /* "allow" */ -#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[17]) -/* "application/grpc" */ -#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[18]) -/* ":authority" */ -#define GRPC_MDSTR_AUTHORITY (grpc_static_slice_table[19]) +#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[57]) /* "authorization" */ -#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[20]) +#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[58]) /* "cache-control" */ -#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[21]) +#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[59]) /* "content-disposition" */ -#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[22]) +#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[60]) /* "content-encoding" */ -#define GRPC_MDSTR_CONTENT_ENCODING (grpc_static_slice_table[23]) +#define GRPC_MDSTR_CONTENT_ENCODING (grpc_static_slice_table[61]) /* "content-language" */ -#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[24]) +#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[62]) /* "content-length" */ -#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[25]) +#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[63]) /* "content-location" */ -#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[26]) +#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[64]) /* "content-range" */ -#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[27]) -/* "content-type" */ -#define GRPC_MDSTR_CONTENT_TYPE (grpc_static_slice_table[28]) +#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[65]) /* "cookie" */ -#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[29]) +#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[66]) /* "date" */ -#define GRPC_MDSTR_DATE (grpc_static_slice_table[30]) -/* "deflate" */ -#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[31]) -/* "deflate,gzip" */ -#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[32]) -/* "" */ -#define GRPC_MDSTR_EMPTY (grpc_static_slice_table[33]) +#define GRPC_MDSTR_DATE (grpc_static_slice_table[67]) /* "etag" */ -#define GRPC_MDSTR_ETAG (grpc_static_slice_table[34]) +#define GRPC_MDSTR_ETAG (grpc_static_slice_table[68]) /* "expect" */ -#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[35]) +#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[69]) /* "expires" */ -#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[36]) +#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[70]) /* "from" */ -#define GRPC_MDSTR_FROM (grpc_static_slice_table[37]) -/* "GET" */ -#define GRPC_MDSTR_GET (grpc_static_slice_table[38]) -/* "grpc" */ -#define GRPC_MDSTR_GRPC (grpc_static_slice_table[39]) -/* "grpc-accept-encoding" */ -#define GRPC_MDSTR_GRPC_ACCEPT_ENCODING (grpc_static_slice_table[40]) -/* "grpc.max_request_message_bytes" */ -#define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \ - (grpc_static_slice_table[41]) -/* "grpc.max_response_message_bytes" */ -#define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \ - (grpc_static_slice_table[42]) -/* "grpc.timeout" */ -#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table[43]) -/* "grpc.wait_for_ready" */ -#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table[44]) -/* "grpc-encoding" */ -#define GRPC_MDSTR_GRPC_ENCODING (grpc_static_slice_table[45]) -/* "grpc-internal-encoding-request" */ -#define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (grpc_static_slice_table[46]) -/* "grpc-message" */ -#define GRPC_MDSTR_GRPC_MESSAGE (grpc_static_slice_table[47]) -/* "grpc-payload-bin" */ -#define GRPC_MDSTR_GRPC_PAYLOAD_BIN (grpc_static_slice_table[48]) -/* "grpc-stats-bin" */ -#define GRPC_MDSTR_GRPC_STATS_BIN (grpc_static_slice_table[49]) -/* "grpc-status" */ -#define GRPC_MDSTR_GRPC_STATUS (grpc_static_slice_table[50]) -/* "grpc-timeout" */ -#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table[51]) -/* "grpc-tracing-bin" */ -#define GRPC_MDSTR_GRPC_TRACING_BIN (grpc_static_slice_table[52]) -/* "gzip" */ -#define GRPC_MDSTR_GZIP (grpc_static_slice_table[53]) -/* "gzip, deflate" */ -#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[54]) -/* "host" */ -#define GRPC_MDSTR_HOST (grpc_static_slice_table[55]) -/* "http" */ -#define GRPC_MDSTR_HTTP (grpc_static_slice_table[56]) -/* "https" */ -#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[57]) -/* "identity" */ -#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[58]) -/* "identity,deflate" */ -#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[59]) -/* "identity,deflate,gzip" */ -#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (grpc_static_slice_table[60]) -/* "identity,gzip" */ -#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[61]) +#define GRPC_MDSTR_FROM (grpc_static_slice_table[71]) /* "if-match" */ -#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[62]) +#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[72]) /* "if-modified-since" */ -#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[63]) +#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[73]) /* "if-none-match" */ -#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[64]) +#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[74]) /* "if-range" */ -#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[65]) +#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[75]) /* "if-unmodified-since" */ -#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[66]) +#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[76]) /* "last-modified" */ -#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[67]) -/* "lb-cost-bin" */ -#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[68]) -/* "lb-token" */ -#define GRPC_MDSTR_LB_TOKEN (grpc_static_slice_table[69]) +#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[77]) /* "link" */ -#define GRPC_MDSTR_LINK (grpc_static_slice_table[70]) +#define GRPC_MDSTR_LINK (grpc_static_slice_table[78]) /* "location" */ -#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[71]) +#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[79]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[72]) -/* ":method" */ -#define GRPC_MDSTR_METHOD (grpc_static_slice_table[73]) -/* ":path" */ -#define GRPC_MDSTR_PATH (grpc_static_slice_table[74]) -/* "POST" */ -#define GRPC_MDSTR_POST (grpc_static_slice_table[75]) +#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[80]) /* "proxy-authenticate" */ -#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[76]) +#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[81]) /* "proxy-authorization" */ -#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[77]) -/* "PUT" */ -#define GRPC_MDSTR_PUT (grpc_static_slice_table[78]) +#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[82]) /* "range" */ -#define GRPC_MDSTR_RANGE (grpc_static_slice_table[79]) +#define GRPC_MDSTR_RANGE (grpc_static_slice_table[83]) /* "referer" */ -#define GRPC_MDSTR_REFERER (grpc_static_slice_table[80]) +#define GRPC_MDSTR_REFERER (grpc_static_slice_table[84]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[81]) +#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[85]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[82]) -/* ":scheme" */ -#define GRPC_MDSTR_SCHEME (grpc_static_slice_table[83]) +#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[86]) /* "server" */ -#define GRPC_MDSTR_SERVER (grpc_static_slice_table[84]) +#define GRPC_MDSTR_SERVER (grpc_static_slice_table[87]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[85]) -/* "/" */ -#define GRPC_MDSTR_SLASH (grpc_static_slice_table[86]) -/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ -#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ - (grpc_static_slice_table[87]) -/* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[88]) -/* ":status" */ -#define GRPC_MDSTR_STATUS (grpc_static_slice_table[89]) +#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[88]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[90]) -/* "te" */ -#define GRPC_MDSTR_TE (grpc_static_slice_table[91]) -/* "trailers" */ -#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[92]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[89]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[93]) -/* "user-agent" */ -#define GRPC_MDSTR_USER_AGENT (grpc_static_slice_table[94]) +#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[90]) /* "vary" */ -#define GRPC_MDSTR_VARY (grpc_static_slice_table[95]) +#define GRPC_MDSTR_VARY (grpc_static_slice_table[91]) /* "via" */ -#define GRPC_MDSTR_VIA (grpc_static_slice_table[96]) +#define GRPC_MDSTR_VIA (grpc_static_slice_table[92]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[97]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[93]) +/* "identity,deflate" */ +#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[94]) +/* "identity,gzip" */ +#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[95]) +/* "deflate,gzip" */ +#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[96]) +/* "identity,deflate,gzip" */ +#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ + (grpc_static_slice_table[97]) bool grpc_is_static_metadata_string(grpc_slice slice); @@ -253,251 +253,297 @@ int grpc_static_metadata_index(grpc_slice slice); #define GRPC_STATIC_MDELEM_COUNT 81 extern grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; -/* "accept-charset": "" */ -#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \ +/* "grpc-status": "0" */ +#define GRPC_MDELEM_GRPC_STATUS_0 \ (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0], GRPC_MDELEM_STORAGE_STATIC)) -/* "accept": "" */ -#define GRPC_MDELEM_ACCEPT_EMPTY \ +/* "grpc-status": "1" */ +#define GRPC_MDELEM_GRPC_STATUS_1 \ (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-status": "2" */ +#define GRPC_MDELEM_GRPC_STATUS_2 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-encoding": "identity" */ +#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-encoding": "gzip" */ +#define GRPC_MDELEM_GRPC_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-encoding": "deflate" */ +#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5], GRPC_MDELEM_STORAGE_STATIC)) +/* "te": "trailers" */ +#define GRPC_MDELEM_TE_TRAILERS \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6], GRPC_MDELEM_STORAGE_STATIC)) +/* "content-type": "application/grpc" */ +#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7], GRPC_MDELEM_STORAGE_STATIC)) +/* ":method": "POST" */ +#define GRPC_MDELEM_METHOD_POST \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "200" */ +#define GRPC_MDELEM_STATUS_200 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "404" */ +#define GRPC_MDELEM_STATUS_404 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10], GRPC_MDELEM_STORAGE_STATIC)) +/* ":scheme": "http" */ +#define GRPC_MDELEM_SCHEME_HTTP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11], GRPC_MDELEM_STORAGE_STATIC)) +/* ":scheme": "https" */ +#define GRPC_MDELEM_SCHEME_HTTPS \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12], GRPC_MDELEM_STORAGE_STATIC)) +/* ":scheme": "grpc" */ +#define GRPC_MDELEM_SCHEME_GRPC \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13], GRPC_MDELEM_STORAGE_STATIC)) +/* ":authority": "" */ +#define GRPC_MDELEM_AUTHORITY_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14], GRPC_MDELEM_STORAGE_STATIC)) +/* ":method": "GET" */ +#define GRPC_MDELEM_METHOD_GET \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15], GRPC_MDELEM_STORAGE_STATIC)) +/* ":method": "PUT" */ +#define GRPC_MDELEM_METHOD_PUT \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16], GRPC_MDELEM_STORAGE_STATIC)) +/* ":path": "/" */ +#define GRPC_MDELEM_PATH_SLASH \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17], GRPC_MDELEM_STORAGE_STATIC)) +/* ":path": "/index.html" */ +#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "204" */ +#define GRPC_MDELEM_STATUS_204 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "206" */ +#define GRPC_MDELEM_STATUS_206 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "304" */ +#define GRPC_MDELEM_STATUS_304 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "400" */ +#define GRPC_MDELEM_STATUS_400 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22], GRPC_MDELEM_STORAGE_STATIC)) +/* ":status": "500" */ +#define GRPC_MDELEM_STATUS_500 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23], GRPC_MDELEM_STORAGE_STATIC)) +/* "accept-charset": "" */ +#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24], GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "" */ #define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25], GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "gzip, deflate" */ #define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26], GRPC_MDELEM_STORAGE_STATIC)) /* "accept-language": "" */ #define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27], GRPC_MDELEM_STORAGE_STATIC)) /* "accept-ranges": "" */ #define GRPC_MDELEM_ACCEPT_RANGES_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28], GRPC_MDELEM_STORAGE_STATIC)) +/* "accept": "" */ +#define GRPC_MDELEM_ACCEPT_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29], GRPC_MDELEM_STORAGE_STATIC)) /* "access-control-allow-origin": "" */ #define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30], GRPC_MDELEM_STORAGE_STATIC)) /* "age": "" */ #define GRPC_MDELEM_AGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31], GRPC_MDELEM_STORAGE_STATIC)) /* "allow": "" */ #define GRPC_MDELEM_ALLOW_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8], GRPC_MDELEM_STORAGE_STATIC)) -/* ":authority": "" */ -#define GRPC_MDELEM_AUTHORITY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32], GRPC_MDELEM_STORAGE_STATIC)) /* "authorization": "" */ #define GRPC_MDELEM_AUTHORIZATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33], GRPC_MDELEM_STORAGE_STATIC)) /* "cache-control": "" */ #define GRPC_MDELEM_CACHE_CONTROL_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34], GRPC_MDELEM_STORAGE_STATIC)) /* "content-disposition": "" */ #define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35], GRPC_MDELEM_STORAGE_STATIC)) /* "content-encoding": "" */ #define GRPC_MDELEM_CONTENT_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36], GRPC_MDELEM_STORAGE_STATIC)) /* "content-language": "" */ #define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37], GRPC_MDELEM_STORAGE_STATIC)) /* "content-length": "" */ #define GRPC_MDELEM_CONTENT_LENGTH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38], GRPC_MDELEM_STORAGE_STATIC)) /* "content-location": "" */ #define GRPC_MDELEM_CONTENT_LOCATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39], GRPC_MDELEM_STORAGE_STATIC)) /* "content-range": "" */ #define GRPC_MDELEM_CONTENT_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17], GRPC_MDELEM_STORAGE_STATIC)) -/* "content-type": "application/grpc" */ -#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40], GRPC_MDELEM_STORAGE_STATIC)) /* "content-type": "" */ #define GRPC_MDELEM_CONTENT_TYPE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41], GRPC_MDELEM_STORAGE_STATIC)) /* "cookie": "" */ #define GRPC_MDELEM_COOKIE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42], GRPC_MDELEM_STORAGE_STATIC)) /* "date": "" */ #define GRPC_MDELEM_DATE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43], GRPC_MDELEM_STORAGE_STATIC)) /* "etag": "" */ #define GRPC_MDELEM_ETAG_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44], GRPC_MDELEM_STORAGE_STATIC)) /* "expect": "" */ #define GRPC_MDELEM_EXPECT_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45], GRPC_MDELEM_STORAGE_STATIC)) /* "expires": "" */ #define GRPC_MDELEM_EXPIRES_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46], GRPC_MDELEM_STORAGE_STATIC)) /* "from": "" */ #define GRPC_MDELEM_FROM_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "deflate" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "deflate,gzip" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "gzip" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "identity" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "identity,deflate" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "identity,deflate,gzip" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-accept-encoding": "identity,gzip" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-encoding": "deflate" */ -#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-encoding": "gzip" */ -#define GRPC_MDELEM_GRPC_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-encoding": "identity" */ -#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-status": "0" */ -#define GRPC_MDELEM_GRPC_STATUS_0 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-status": "1" */ -#define GRPC_MDELEM_GRPC_STATUS_1 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37], GRPC_MDELEM_STORAGE_STATIC)) -/* "grpc-status": "2" */ -#define GRPC_MDELEM_GRPC_STATUS_2 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47], GRPC_MDELEM_STORAGE_STATIC)) /* "host": "" */ #define GRPC_MDELEM_HOST_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48], GRPC_MDELEM_STORAGE_STATIC)) /* "if-match": "" */ #define GRPC_MDELEM_IF_MATCH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49], GRPC_MDELEM_STORAGE_STATIC)) /* "if-modified-since": "" */ #define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50], GRPC_MDELEM_STORAGE_STATIC)) /* "if-none-match": "" */ #define GRPC_MDELEM_IF_NONE_MATCH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51], GRPC_MDELEM_STORAGE_STATIC)) /* "if-range": "" */ #define GRPC_MDELEM_IF_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52], GRPC_MDELEM_STORAGE_STATIC)) /* "if-unmodified-since": "" */ #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53], GRPC_MDELEM_STORAGE_STATIC)) /* "last-modified": "" */ #define GRPC_MDELEM_LAST_MODIFIED_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45], GRPC_MDELEM_STORAGE_STATIC)) -/* "lb-cost-bin": "" */ -#define GRPC_MDELEM_LB_COST_BIN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54], GRPC_MDELEM_STORAGE_STATIC)) /* "lb-token": "" */ #define GRPC_MDELEM_LB_TOKEN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55], GRPC_MDELEM_STORAGE_STATIC)) +/* "lb-cost-bin": "" */ +#define GRPC_MDELEM_LB_COST_BIN_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56], GRPC_MDELEM_STORAGE_STATIC)) /* "link": "" */ #define GRPC_MDELEM_LINK_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57], GRPC_MDELEM_STORAGE_STATIC)) /* "location": "" */ #define GRPC_MDELEM_LOCATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58], GRPC_MDELEM_STORAGE_STATIC)) /* "max-forwards": "" */ #define GRPC_MDELEM_MAX_FORWARDS_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50], GRPC_MDELEM_STORAGE_STATIC)) -/* ":method": "GET" */ -#define GRPC_MDELEM_METHOD_GET \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51], GRPC_MDELEM_STORAGE_STATIC)) -/* ":method": "POST" */ -#define GRPC_MDELEM_METHOD_POST \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52], GRPC_MDELEM_STORAGE_STATIC)) -/* ":method": "PUT" */ -#define GRPC_MDELEM_METHOD_PUT \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53], GRPC_MDELEM_STORAGE_STATIC)) -/* ":path": "/" */ -#define GRPC_MDELEM_PATH_SLASH \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54], GRPC_MDELEM_STORAGE_STATIC)) -/* ":path": "/index.html" */ -#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59], GRPC_MDELEM_STORAGE_STATIC)) /* "proxy-authenticate": "" */ #define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60], GRPC_MDELEM_STORAGE_STATIC)) /* "proxy-authorization": "" */ #define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61], GRPC_MDELEM_STORAGE_STATIC)) /* "range": "" */ #define GRPC_MDELEM_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62], GRPC_MDELEM_STORAGE_STATIC)) /* "referer": "" */ #define GRPC_MDELEM_REFERER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63], GRPC_MDELEM_STORAGE_STATIC)) /* "refresh": "" */ #define GRPC_MDELEM_REFRESH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64], GRPC_MDELEM_STORAGE_STATIC)) /* "retry-after": "" */ #define GRPC_MDELEM_RETRY_AFTER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61], GRPC_MDELEM_STORAGE_STATIC)) -/* ":scheme": "grpc" */ -#define GRPC_MDELEM_SCHEME_GRPC \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62], GRPC_MDELEM_STORAGE_STATIC)) -/* ":scheme": "http" */ -#define GRPC_MDELEM_SCHEME_HTTP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63], GRPC_MDELEM_STORAGE_STATIC)) -/* ":scheme": "https" */ -#define GRPC_MDELEM_SCHEME_HTTPS \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65], GRPC_MDELEM_STORAGE_STATIC)) /* "server": "" */ #define GRPC_MDELEM_SERVER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66], GRPC_MDELEM_STORAGE_STATIC)) /* "set-cookie": "" */ #define GRPC_MDELEM_SET_COOKIE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "200" */ -#define GRPC_MDELEM_STATUS_200 \ (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "204" */ -#define GRPC_MDELEM_STATUS_204 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "206" */ -#define GRPC_MDELEM_STATUS_206 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "304" */ -#define GRPC_MDELEM_STATUS_304 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "400" */ -#define GRPC_MDELEM_STATUS_400 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "404" */ -#define GRPC_MDELEM_STATUS_404 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72], GRPC_MDELEM_STORAGE_STATIC)) -/* ":status": "500" */ -#define GRPC_MDELEM_STATUS_500 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73], GRPC_MDELEM_STORAGE_STATIC)) /* "strict-transport-security": "" */ #define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74], GRPC_MDELEM_STORAGE_STATIC)) -/* "te": "trailers" */ -#define GRPC_MDELEM_TE_TRAILERS \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68], GRPC_MDELEM_STORAGE_STATIC)) /* "transfer-encoding": "" */ #define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69], GRPC_MDELEM_STORAGE_STATIC)) /* "user-agent": "" */ #define GRPC_MDELEM_USER_AGENT_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70], GRPC_MDELEM_STORAGE_STATIC)) /* "vary": "" */ #define GRPC_MDELEM_VARY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71], GRPC_MDELEM_STORAGE_STATIC)) /* "via": "" */ #define GRPC_MDELEM_VIA_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72], GRPC_MDELEM_STORAGE_STATIC)) /* "www-authenticate": "" */ #define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "identity" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "deflate" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "identity,deflate" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "gzip" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "identity,gzip" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "deflate,gzip" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79], GRPC_MDELEM_STORAGE_STATIC)) +/* "grpc-accept-encoding": "identity,deflate,gzip" */ +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80], GRPC_MDELEM_STORAGE_STATIC)) grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b); +typedef enum { + GRPC_BATCH_PATH, + GRPC_BATCH_STATUS, + GRPC_BATCH_SCHEME, + GRPC_BATCH_GRPC_MESSAGE, + GRPC_BATCH_GRPC_PAYLOAD_BIN, + GRPC_BATCH_GRPC_ACCEPT_ENCODING, + GRPC_BATCH_GRPC_INTERNAL_ENCODING_REQUEST, + GRPC_BATCH_HOST, + GRPC_BATCH_LB_COST_BIN, + GRPC_BATCH_GRPC_ENCODING, + GRPC_BATCH_CONTENT_TYPE, + GRPC_BATCH_USER_AGENT, + GRPC_BATCH_AUTHORITY, + GRPC_BATCH_METHOD, + GRPC_BATCH_GRPC_STATUS, + GRPC_BATCH_TE, + GRPC_BATCH_LB_TOKEN, + GRPC_BATCH_CALLOUTS_COUNT +} grpc_metadata_batch_callouts_index; + +typedef union { + struct grpc_linked_mdelem *array[GRPC_BATCH_CALLOUTS_COUNT]; + struct { + struct grpc_linked_mdelem *path; + struct grpc_linked_mdelem *status; + struct grpc_linked_mdelem *scheme; + struct grpc_linked_mdelem *grpc_message; + struct grpc_linked_mdelem *grpc_payload_bin; + struct grpc_linked_mdelem *grpc_accept_encoding; + struct grpc_linked_mdelem *grpc_internal_encoding_request; + struct grpc_linked_mdelem *host; + struct grpc_linked_mdelem *lb_cost_bin; + struct grpc_linked_mdelem *grpc_encoding; + struct grpc_linked_mdelem *content_type; + struct grpc_linked_mdelem *user_agent; + struct grpc_linked_mdelem *authority; + struct grpc_linked_mdelem *method; + struct grpc_linked_mdelem *grpc_status; + struct grpc_linked_mdelem *te; + struct grpc_linked_mdelem *lb_token; + } named; +} grpc_metadata_batch_callouts; + +grpc_metadata_batch_callouts_index grpc_batch_index_of(grpc_slice slice); + extern const uint8_t grpc_static_accept_encoding_metadata[8]; #define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \ (GRPC_MAKE_MDELEM( \ |