aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-22 09:25:57 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-22 09:25:57 -0700
commit10ee2747a92a20c0bbe8cf3e2e759a121c6cb076 (patch)
treed295d20b29d36c273216368e93b5fcdb65892f76 /src/core/channel
parentd9fdaf204cbca6472f5588eba83f37c01bb6c8a4 (diff)
parent1ca05139a2d3b05518d73200b53ccb86161eeef3 (diff)
Merge github.com:grpc/grpc into we-are-one
Diffstat (limited to 'src/core/channel')
-rw-r--r--src/core/channel/http_client_filter.c12
-rw-r--r--src/core/channel/http_server_filter.c3
2 files changed, 8 insertions, 7 deletions
diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c
index d0adafc048..0aa708694d 100644
--- a/src/core/channel/http_client_filter.c
+++ b/src/core/channel/http_client_filter.c
@@ -70,10 +70,10 @@ typedef struct channel_data {
typedef struct {
grpc_call_element *elem;
grpc_call_list *call_list;
-} client_filter_args;
+} client_recv_filter_args;
-static grpc_mdelem *client_filter(void *user_data, grpc_mdelem *md) {
- client_filter_args *a = user_data;
+static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) {
+ client_recv_filter_args *a = user_data;
grpc_call_element *elem = a->elem;
channel_data *channeld = elem->channel_data;
if (md == channeld->status) {
@@ -81,6 +81,8 @@ static grpc_mdelem *client_filter(void *user_data, grpc_mdelem *md) {
} else if (md->key == channeld->status->key) {
grpc_call_element_send_cancel(elem, a->call_list);
return NULL;
+ } else if (md->key == channeld->content_type->key) {
+ return NULL;
}
return md;
}
@@ -94,12 +96,12 @@ static void hc_on_recv(void *user_data, int success,
grpc_stream_op *ops = calld->recv_ops->ops;
for (i = 0; i < nops; i++) {
grpc_stream_op *op = &ops[i];
- client_filter_args a;
+ client_recv_filter_args a;
if (op->type != GRPC_OP_METADATA) continue;
calld->got_initial_metadata = 1;
a.elem = elem;
a.call_list = call_list;
- grpc_metadata_batch_filter(&op->data.metadata, client_filter, &a);
+ grpc_metadata_batch_filter(&op->data.metadata, client_recv_filter, &a);
}
calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success, call_list);
}
diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c
index 70cc4f298a..448ce9a5b1 100644
--- a/src/core/channel/http_server_filter.c
+++ b/src/core/channel/http_server_filter.c
@@ -117,8 +117,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
return NULL;
} else if (md->key == channeld->te_trailers->key ||
md->key == channeld->method_post->key ||
- md->key == channeld->http_scheme->key ||
- md->key == channeld->content_type->key) {
+ md->key == channeld->http_scheme->key) {
gpr_log(GPR_ERROR, "Invalid %s: header: '%s'",
grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value));
/* swallow it and error everything out. */