Skip to content

Commit

Permalink
Merge pull request grpc#3257 from ctiller/!!!!
Browse files Browse the repository at this point in the history
Fix a case where :status could be returned to applications
  • Loading branch information
yang-g committed Sep 4, 2015
2 parents ce7a4f6 + 37b0044 commit 0496e53
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/core/channel/http_client_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,14 @@ static grpc_mdelem *client_filter(void *user_data, grpc_mdelem *md) {
static void hc_on_recv(void *user_data, int success) {
grpc_call_element *elem = user_data;
call_data *calld = elem->call_data;
if (success) {
size_t i;
size_t nops = calld->recv_ops->nops;
grpc_stream_op *ops = calld->recv_ops->ops;
for (i = 0; i < nops; i++) {
grpc_stream_op *op = &ops[i];
if (op->type != GRPC_OP_METADATA) continue;
calld->got_initial_metadata = 1;
grpc_metadata_batch_filter(&op->data.metadata, client_filter, elem);
}
size_t i;
size_t nops = calld->recv_ops->nops;
grpc_stream_op *ops = calld->recv_ops->ops;
for (i = 0; i < nops; i++) {
grpc_stream_op *op = &ops[i];
if (op->type != GRPC_OP_METADATA) continue;
calld->got_initial_metadata = 1;
grpc_metadata_batch_filter(&op->data.metadata, client_filter, elem);
}
calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success);
}
Expand Down

0 comments on commit 0496e53

Please sign in to comment.