|
|
|
@ -154,17 +154,8 @@ static uint32_t target_write_size(grpc_chttp2_transport *t) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Returns true if initial_metadata contains only default headers.
|
|
|
|
|
//
|
|
|
|
|
// TODO(roth): The fact that we hard-code these particular headers here
|
|
|
|
|
// is fairly ugly. Need some better way to know which headers are
|
|
|
|
|
// default, maybe via a bit in the static metadata table?
|
|
|
|
|
static bool is_default_initial_metadata(grpc_metadata_batch *initial_metadata) { |
|
|
|
|
int num_default_fields = |
|
|
|
|
(initial_metadata->idx.named.status != NULL) + |
|
|
|
|
(initial_metadata->idx.named.content_type != NULL) + |
|
|
|
|
(initial_metadata->idx.named.grpc_encoding != NULL) + |
|
|
|
|
(initial_metadata->idx.named.grpc_accept_encoding != NULL); |
|
|
|
|
return (size_t)num_default_fields == initial_metadata->list.count; |
|
|
|
|
return initial_metadata->list.static_count == initial_metadata->list.count; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
grpc_chttp2_begin_write_result grpc_chttp2_begin_write( |
|
|
|
|