aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel/compress_filter.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-11-19 08:53:23 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-11-19 08:53:23 -0800
commited43f51fffa338bb3e443d727dd345bcbfd4ae79 (patch)
treecac9f31ab47eae35457d1af220faa9d0b3884306 /src/core/channel/compress_filter.c
parent70b080d2849692cbd14fe0cfd9089dc159a8f748 (diff)
Beginning to peel away mdctx from channel stack
Diffstat (limited to 'src/core/channel/compress_filter.c')
-rw-r--r--src/core/channel/compress_filter.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c
index f23d8052f3..62219f5aa7 100644
--- a/src/core/channel/compress_filter.c
+++ b/src/core/channel/compress_filter.c
@@ -44,6 +44,7 @@
#include "src/core/profiling/timers.h"
#include "src/core/compression/message_compress.h"
#include "src/core/support/string.h"
+#include "src/core/transport/static_metadata.h"
typedef struct call_data {
gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */
@@ -67,16 +68,6 @@ typedef struct call_data {
} call_data;
typedef struct channel_data {
- /** Metadata key for the incoming (requested) compression algorithm */
- grpc_mdstr *mdstr_request_compression_algorithm_key;
- /** Metadata key for the outgoing (used) compression algorithm */
- grpc_mdstr *mdstr_outgoing_compression_algorithm_key;
- /** Metadata key for the accepted encodings */
- grpc_mdstr *mdstr_compression_capabilities_key;
- /** Precomputed metadata elements for all available compression algorithms */
- grpc_mdelem *mdelem_compression_algorithms[GRPC_COMPRESS_ALGORITHMS_COUNT];
- /** Precomputed metadata elements for the accepted encodings */
- grpc_mdelem *mdelem_accept_encoding;
/** The default, channel-level, compression algorithm */
grpc_compression_algorithm default_compression_algorithm;
/** Compression options for the channel */
@@ -91,7 +82,7 @@ static grpc_mdelem *compression_md_filter(void *user_data, grpc_mdelem *md) {
call_data *calld = elem->call_data;
channel_data *channeld = elem->channel_data;
- if (md->key == channeld->mdstr_request_compression_algorithm_key) {
+ if (md->key == GRPC_MDSTR_GRPC_ENCODING) {
const char *md_c_str = grpc_mdstr_as_c_string(md->value);
if (!grpc_compression_algorithm_parse(md_c_str, strlen(md_c_str),
&calld->compression_algorithm)) {