From 3e4f49f88d611efb9573972a18ca727f50292d14 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 18 May 2016 23:59:02 -0700 Subject: Added check for client in call.c's default level processing code. --- src/core/lib/surface/call.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index d081e03e2c..69eb43c952 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1406,12 +1406,14 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, effective_compression_level = copts.default_level.level; } } - if (level_set) { + if (level_set && !call->is_client) { const grpc_compression_algorithm calgo = compression_algorithm_for_level_locked( call, effective_compression_level); char *calgo_name; grpc_compression_algorithm_name(calgo, &calgo_name); + // the following will be picked up by the compress filter and used as + // the call's compression algorithm. compression_md.key = GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY; compression_md.value = calgo_name; compression_md.value_length = strlen(calgo_name); -- cgit v1.2.3