diff options
author | David Garcia Quintas <dgq@google.com> | 2015-07-08 19:45:03 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-07-08 19:45:03 -0700 |
commit | d1b627705410953d29cc875f3b95652b2d1a3cc0 (patch) | |
tree | 6fce673dbf04f46585fc811a590e0c3e3874d8ce /src | |
parent | 17bb64981a0035482193a6c02b030594b3a68f25 (diff) |
Added missing bits from pr comments
Diffstat (limited to 'src')
-rw-r--r-- | src/core/channel/compress_filter.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c index 058f920f16..bcaf7d706d 100644 --- a/src/core/channel/compress_filter.c +++ b/src/core/channel/compress_filter.c @@ -172,14 +172,18 @@ static void finish_not_compressed_sopb(grpc_stream_op_buffer *send_ops, sop->data.begin_message.flags &= ~GRPC_WRITE_INTERNAL_COMPRESS; break; case GRPC_OP_METADATA: - grpc_metadata_batch_add_head( - &(sop->data.metadata), &calld->compression_algorithm_storage, - grpc_mdelem_ref( - channeld->mdelem_compression_algorithms[GRPC_COMPRESS_NONE])); + if (!calld->seen_initial_metadata) { + grpc_metadata_batch_add_head( + &(sop->data.metadata), &calld->compression_algorithm_storage, + grpc_mdelem_ref( + channeld->mdelem_compression_algorithms[GRPC_COMPRESS_NONE])); + calld->seen_initial_metadata = 1; /* GPR_TRUE */ + } break; case GRPC_OP_SLICE: + break; case GRPC_NO_OP: - ; /* fallthrough */ + break; } } } |