Merge pull request #3005 from dgquintas/head_vs_tails

Fixed wrong creation of metadata in compression.
pull/3017/head
Yang Gao 9 years ago
commit f0ee18d935
  1. 4
      include/grpc/compression.h
  2. 2
      src/core/channel/compress_filter.c

@ -67,7 +67,9 @@ int grpc_compression_algorithm_parse(const char *name, size_t name_length,
grpc_compression_algorithm *algorithm);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. Returns 1 upon success, 0 otherwise. */
* algorithm. Note that the string returned through \a name upon success is
* statically allocated and shouldn't be freed. Returns 1 upon success, 0
* otherwise. */
int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
char **name);

@ -216,7 +216,7 @@ static void process_send_ops(grpc_call_element *elem,
[calld->compression_algorithm]));
/* convey supported compression algorithms */
grpc_metadata_batch_add_head(
grpc_metadata_batch_add_tail(
&(sop->data.metadata), &calld->accept_encoding_storage,
GRPC_MDELEM_REF(channeld->mdelem_accept_encoding));

Loading…
Cancel
Save