diff options
author | David Garcia Quintas <dgq@google.com> | 2016-05-18 23:59:02 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-05-18 23:59:02 -0700 |
commit | 3e4f49f88d611efb9573972a18ca727f50292d14 (patch) | |
tree | a359324694b3aafb6ce9221c5319ee1036194616 /src/core/lib/surface | |
parent | ac0944701ab93d6746f81a2a9ab38ee411e663d8 (diff) |
Added check for client in call.c's default level processing code.
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r-- | src/core/lib/surface/call.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |