Added missing bits from pr comments

pull/2135/head
David Garcia Quintas 10 years ago
parent 17bb64981a
commit d1b6277054
  1. 14
      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; sop->data.begin_message.flags &= ~GRPC_WRITE_INTERNAL_COMPRESS;
break; break;
case GRPC_OP_METADATA: case GRPC_OP_METADATA:
grpc_metadata_batch_add_head( if (!calld->seen_initial_metadata) {
&(sop->data.metadata), &calld->compression_algorithm_storage, grpc_metadata_batch_add_head(
grpc_mdelem_ref( &(sop->data.metadata), &calld->compression_algorithm_storage,
channeld->mdelem_compression_algorithms[GRPC_COMPRESS_NONE])); grpc_mdelem_ref(
channeld->mdelem_compression_algorithms[GRPC_COMPRESS_NONE]));
calld->seen_initial_metadata = 1; /* GPR_TRUE */
}
break; break;
case GRPC_OP_SLICE: case GRPC_OP_SLICE:
break;
case GRPC_NO_OP: case GRPC_NO_OP:
; /* fallthrough */ break;
} }
} }
} }

Loading…
Cancel
Save